-spf (Use fully qualified file paths) switch

Switch Description
-spf Use absolute paths including drive letter.
-spf2 Use full paths without drive letter.

Enables the mode that allows to use fully qualified file paths in archives. If -spf switch is not specified, 7-Zip reduces file paths to relative paths when it adds files to archive, and 7-Zip converts paths to relative paths when you extract archive. If -spf switch is specified, 7-Zip doesn't try to process or convert paths.

Fully qualified file paths begin with one of the following:

If -spf switch is specified, but the path is not fully qualified, 7-Zip will use specified path, it will not convert the path to fully qualified path.

Please be careful, if you use -spf switch with "extract" command. Check that file names in archive are correct. Note that with -spf switch 7-Zip can try to rewrite any file with path specified in archive.

Syntax

-spf

Examples

7z a a.7z -spf c:\Files\test.txt d:\test.txt

stores both txt files with full paths.

7z x a.7z -spf

extracts files from a.7z archive with exact file paths specified in archive.

Commands that can be used with this switch

a (Add), d (Delete), e (Extract), u (Update), x (Extract with full paths)

See also

Switches: