I want to compress all these files/folders individually in 1 batch process. If i had 1 billion folder OMG!!! See the problem. So i need help batch compressing these folders. I have yet to find out how to.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Additional info i forgot to mention - I was able to access the command line but dont know what commands to use or how to use it so that it executes on the desired files/folders.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
My mind is not is the right state of mind to be able to decipher 'for %i in (*.pdf) do 7z -a %i.7z %i ', and to learn the command line version of 7zip.
Anyone in the right state of mind able to decipher that and use it according to the image showing the directory in the first post? I want to batch compress the folders in there.
If you do that ill let you keep a picture i just drew - its a WIP and ill send you the completed version when done.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I think the commands there will suit your needs: http://notepad.patheticcockroach.com/857/some-7-zip-command-line-examples/ They're meant to be launched from command line, but for a batch file just add some extra % where needed, like:
for /D %%A in (*) do "G:\full\path\to\7z.exe" a -t7z -m9=LZMA2 "%%A.7z" %%A
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
hm looks like I can't edit, little mistake in previous post, it should be:
for /D %%A in (*) do "G:\full\path\to\7z.exe" a -t7z -m9=LZMA2 "%%A.7z" "%%A"
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi people. I am trying to do the same batch process but this time so that it avoids/removes the folders from being included, and only compress the files (including sub folders within the first sub folders off course) within the folders. So when you open one of the generated archives there is no folder to go through first, just the files right there. But i still want to compress the main folder that consist of all the sub folders, just not the first sub folders them self.
This is the current code that archives the folders in a batch, im trying to change it so it does the trick above.
for /D %A in (*) do "H:\Program Files\7-Zip\7z.exe" a -t7z -m9=LZMA2 "%A.zip" "%A"
Also, i find that compressing in command line makes the archives different from compressing using the GUI, is this so because iv notice that they are different and only the GUI works properly for what im using them for. The command line archives are somehow different. Am i even making the archives into .zip format properly?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This creates 7z (-t) LZMA2 (-m9) archives. So that's not a proper zip archive if you just change the extension ;) For zip I think you could try sth like -tzip and -m9=Deflate.
As for what you describe, I don't know (yet)… I'll see what I can find…
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Thanks, i am slowly (when time allows) learning to see what can be done to achieve what i mentioned. Complex command with command-line is very new to me.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
well, take your time and start with simple things. Read the help-file that ships with 7-Zip and try to get some information about command-line and what is the difference between a command given in by hand on a prompt and a batch-file.
Believe me, it helps :-)
Best regards!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I want to compress all these files/folders individually in 1 batch process. If i had 1 billion folder OMG!!! See the problem. So i need help batch compressing these folders. I have yet to find out how to.
Additional info i forgot to mention - I was able to access the command line but dont know what commands to use or how to use it so that it executes on the desired files/folders.
Hello everyone,
have a look here and re-arange the command-lines to fit your needs.
Best regards!
My mind is not is the right state of mind to be able to decipher 'for %i in (*.pdf) do 7z -a %i.7z %i ', and to learn the command line version of 7zip.
Anyone in the right state of mind able to decipher that and use it according to the image showing the directory in the first post? I want to batch compress the folders in there.
If you do that ill let you keep a picture i just drew - its a WIP and ill send you the completed version when done.
I think the commands there will suit your needs: http://notepad.patheticcockroach.com/857/some-7-zip-command-line-examples/ They're meant to be launched from command line, but for a batch file just add some extra % where needed, like:
for /D %%A in (*) do "G:\full\path\to\7z.exe" a -t7z -m9=LZMA2 "%%A.7z" %%A
hm looks like I can't edit, little mistake in previous post, it should be:
for /D %%A in (*) do "G:\full\path\to\7z.exe" a -t7z -m9=LZMA2 "%%A.7z" "%%A"
@vacon and mpam
Thank you both!
Hi people. I am trying to do the same batch process but this time so that it avoids/removes the folders from being included, and only compress the files (including sub folders within the first sub folders off course) within the folders. So when you open one of the generated archives there is no folder to go through first, just the files right there. But i still want to compress the main folder that consist of all the sub folders, just not the first sub folders them self.
This is the current code that archives the folders in a batch, im trying to change it so it does the trick above.
for /D %A in (*) do "H:\Program Files\7-Zip\7z.exe" a -t7z -m9=LZMA2 "%A.zip" "%A"
Also, i find that compressing in command line makes the archives different from compressing using the GUI, is this so because iv notice that they are different and only the GUI works properly for what im using them for. The command line archives are somehow different. Am i even making the archives into .zip format properly?
This creates 7z (-t) LZMA2 (-m9) archives. So that's not a proper zip archive if you just change the extension ;) For zip I think you could try sth like -tzip and -m9=Deflate.
As for what you describe, I don't know (yet)… I'll see what I can find…
Thanks, i am slowly (when time allows) learning to see what can be done to achieve what i mentioned. Complex command with command-line is very new to me.
Hello everyone,
well, take your time and start with simple things. Read the help-file that ships with 7-Zip and try to get some information about command-line and what is the difference between a command given in by hand on a prompt and a batch-file.
Believe me, it helps :-)
Best regards!