This is my first time useing 7-Zip. I think it is going to work for me but I have one issue.
I have created a bat file where I am attempting to zip all files in a specific folder (C:\MyFiles\Test)
But I don't want the Test folder in the zip file.
The below code is creating Test.zip and inside Test.zip is the Test folder with all documents in the Test folder.
I want the code to create Test.zip and inside Test.zip include only all documents in the Test folder. Not the Test folder itself.
for %%X in (C:\MyFiles\Test) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"
Current:
Test.zip
> Test
> 1.txt
> 2.pdf
> 3.pdf
Desired:
Test.zip
> 1.txt
> 2.pdf
> 3.pdf
Thanks
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This is my first time useing 7-Zip. I think it is going to work for me but I have one issue.
I have created a bat file where I am attempting to zip all files in a specific folder (C:\MyFiles\Test)
But I don't want the Test folder in the zip file.
The below code is creating Test.zip and inside Test.zip is the Test folder with all documents in the Test folder.
I want the code to create Test.zip and inside Test.zip include only all documents in the Test folder. Not the Test folder itself.
for %%X in (C:\MyFiles\Test) do "c:\Program Files\7-Zip\7z.exe" a "%%X.zip" "%%X\"
Current:
Test.zip
> Test
> 1.txt
> 2.pdf
> 3.pdf
Desired:
Test.zip
> 1.txt
> 2.pdf
> 3.pdf
Thanks
Got it...
"c:\Program Files\7-Zip\7z.exe" a C:\MyFiles\Test.zip C:\MyFiles\Test*
Results in:
C:\MyFiles\Test.zip
> 1.txt
> 2.pdf
> 3.pdf
Hope this helps somebody save some time.
Got it...
"c:\Program Files\7-Zip\7z.exe" a C:\MyFiles\Test.zip C:\MyFiles\Test*
Results in:
C:\MyFiles\Test.zip
> 1.txt
> 2.pdf
> 3.pdf
Hope this helps somebody save some time.