Infrequent user of 7z command line. Running windows 7, 7z version 9.10 beta.
Here's the command line I'm having an issue with:
7z e "c:\NWCC Payroll Port\_ZIPS\nwccperl.7z" -o"C:\NWCC Payroll port\_UNZIPS"
I want to extract the files from an archive into a specific directory, NOT the one the archive was created from. The operation extracts the desired files to the desired directory just fine but - an empty subdirectory is created in the destination directory. Is there some way I can keep this from happening? This will eventually be run on another user's computer but I'm testing it now on my computer, where the archive was created. Below is the command output, also showing the destination directory contents before and after the extract operation.
TIA, Phil
c:\bat>dir "C:\NWCC Payroll port\_UNZIPS"
Volume in drive C is OS
Volume Serial Number is B231-12AD
Directory of C:\NWCC Payroll port\_UNZIPS
03/09/2012 10:51 AM <DIR> .
03/09/2012 10:51 AM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 906,441,867,264 bytes free
c:\bat>7z e "c:\NWCC Payroll Port\_ZIPS\nwccperl.7z" -o"C:\NWCC Payroll port\_UNZIPS"
7-Zip 9.10 beta Copyright (C) 1999-2009 Igor Pavlov 2009-12-22
#1 Do you want directory "NWCC Perl" included in archive "nwccperl.7z"?
If no you must either "CD " or "PUSHD" into that directory before creating archive "nwccperl.7z".
See CD/? and PUSHD/? for details of those internal commands.
OR
Try changing archive command from like:
7z a nwccperl.7z "NWCC PERL\*"
to like:
7z a nwccperl.7z ".\NWCC PERL\*"
#2 The reason that the files are not extracted into the directory "C:\NWCC Payroll port\_UNZIPS\NWCC PERL", the directory in which they are contained in the archive, is due to the use of the e (Extract) command. If you desire the files to be extracted to "C:\NWCC Payroll port\_UNZIPS\NWCC PERL" you must use the x (Extract with full paths) command; or revise the archive command.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I had been using 7z a nwccperl.7z NWCC PERL\. With that command, the nwcc perl directory showed up in the archive. Same thing when I tried 7z a nwccperl.7z .\NWCC PERL\.
When I used 7z a nwccperl.7z NWCC PERL\* the nwcc perl directory did not show up in the archive.
The cd /D did not make any difference.
Thanks for your help, Fernando.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Infrequent user of 7z command line. Running windows 7, 7z version 9.10 beta.
Here's the command line I'm having an issue with:
7z e "c:\NWCC Payroll Port\_ZIPS\nwccperl.7z" -o"C:\NWCC Payroll port\_UNZIPS"
I want to extract the files from an archive into a specific directory, NOT the one the archive was created from. The operation extracts the desired files to the desired directory just fine but - an empty subdirectory is created in the destination directory. Is there some way I can keep this from happening? This will eventually be run on another user's computer but I'm testing it now on my computer, where the archive was created. Below is the command output, also showing the destination directory contents before and after the extract operation.
TIA, Phil
c:\bat>dir "C:\NWCC Payroll port\_UNZIPS"
Volume in drive C is OS
Volume Serial Number is B231-12AD
Directory of C:\NWCC Payroll port\_UNZIPS
03/09/2012 10:51 AM <DIR> .
03/09/2012 10:51 AM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 906,441,867,264 bytes free
c:\bat>7z e "c:\NWCC Payroll Port\_ZIPS\nwccperl.7z" -o"C:\NWCC Payroll port\_UNZIPS"
7-Zip 9.10 beta Copyright (C) 1999-2009 Igor Pavlov 2009-12-22
Processing archive: c:\NWCC Payroll Port\_ZIPS\nwccperl.7z
Extracting NWCC Perl\createPEDir.exe
Extracting NWCC Perl\emailChecks.exe
Extracting NWCC Perl
Everything is Ok
Folders: 1
Files: 2
Size: 5390528
Compressed: 4769096
c:\bat>dir "C:\NWCC Payroll port\_UNZIPS"
Volume in drive C is OS
Volume Serial Number is B231-12AD
Directory of C:\NWCC Payroll port\_UNZIPS
03/09/2012 10:53 AM <DIR> .
03/09/2012 10:53 AM <DIR> ..
03/08/2012 09:42 PM 2,203,744 createPEDir.exe
03/08/2012 01:26 AM 3,186,784 emailChecks.exe
03/08/2012 11:21 PM <DIR> NWCC Perl
2 File(s) 5,390,528 bytes
3 Dir(s) 906,436,403,200 bytes free
c:\bat>dir "C:\NWCC Payroll port\_UNZIPS\NWCC PERL"
Volume in drive C is OS
Volume Serial Number is B231-12AD
Directory of C:\NWCC Payroll port\_UNZIPS\NWCC PERL
03/08/2012 11:21 PM <DIR> .
03/08/2012 11:21 PM <DIR> ..
0 File(s) 0 bytes
2 Dir(s) 906,435,624,960 bytes free
#1 Do you want directory "NWCC Perl" included in archive "nwccperl.7z"?
If no you must either "CD " or "PUSHD" into that directory before creating archive "nwccperl.7z".
See CD/? and PUSHD/? for details of those internal commands.
OR
Try changing archive command from like:
7z a nwccperl.7z "NWCC PERL\*"
to like:
7z a nwccperl.7z ".\NWCC PERL\*"
#2 The reason that the files are not extracted into the directory "C:\NWCC Payroll port\_UNZIPS\NWCC PERL", the directory in which they are contained in the archive, is due to the use of the e (Extract) command. If you desire the files to be extracted to "C:\NWCC Payroll port\_UNZIPS\NWCC PERL" you must use the x (Extract with full paths) command; or revise the archive command.
I had been using 7z a nwccperl.7z NWCC PERL\. With that command, the nwcc perl directory showed up in the archive. Same thing when I tried 7z a nwccperl.7z .\NWCC PERL\.
When I used 7z a nwccperl.7z NWCC PERL\* the nwcc perl directory did not show up in the archive.
The cd /D did not make any difference.
Thanks for your help, Fernando.