using .bat to search the folder and compres files into zip.
Moderator: DosItHelp
-
- Posts: 2
- Joined: 23 Dec 2008 03:54
using .bat to search the folder and compres files into zip.
hi there!
I'm just wondering is it possible, that a simple MS-DOS Batch file could find files and compres them into zip? I have a network drive, and the pictures are in one place, separated in subfolders named for example 2006, 2007... could you help or give me some useful tips?
Thanks,
Adrian N.
I'm just wondering is it possible, that a simple MS-DOS Batch file could find files and compres them into zip? I have a network drive, and the pictures are in one place, separated in subfolders named for example 2006, 2007... could you help or give me some useful tips?
Thanks,
Adrian N.
-
- Posts: 2
- Joined: 23 Dec 2008 03:54
here are a couple methods i use
winrar
START /belownormal /wait /min /D"C:\Program Files\WinRAR" winrar a -ep -afzip "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip"
7-zip
START /belownormal /wait /D"C:\Program Files\7-Zip\" 7z.exe a -tzip -r -mx5 "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip"
winrar
START /belownormal /wait /min /D"C:\Program Files\WinRAR" winrar a -ep -afzip "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip"
7-zip
START /belownormal /wait /D"C:\Program Files\7-Zip\" 7z.exe a -tzip -r -mx5 "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip"
-
- Posts: 12
- Joined: 10 Oct 2008 04:50
Known
If you want to know all related command, just open Winrar then goto help and find there..
Thanks
Thanks
Re: using .bat to search the folder and compres files into z
thanks
its zipping a file .........but can i zip a folder........using this same command
its zipping a file .........but can i zip a folder........using this same command
Re: using .bat to search the folder and compres files into z
santhosh, both this commands zip a folder
Note:
START /belownormal /wait /min /D"C:\Program Files\WinRAR" winrar a -ep1 -afzip "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip"
Note:
START /belownormal /wait /min /D"C:\Program Files\WinRAR" winrar a -ep1 -afzip "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip"
Re: using .bat to search the folder and compres files into z
!k thnks,
but again i am facing same problem, its zipping only files inside that folder...not the folder.
example:
i have a folder name sat,inside this i got sub folders and files.
now i want to zip this sat folder.
when i tried its zipping all the files but not the folder.
kindly help me out what changes should i do.
but again i am facing same problem, its zipping only files inside that folder...not the folder.
example:
i have a folder name sat,inside this i got sub folders and files.
now i want to zip this sat folder.
when i tried its zipping all the files but not the folder.
kindly help me out what changes should i do.
Re: using .bat to search the folder and compres files into z
one more example....if that sat folder doesn't have any file, when i run the script it shows error " no files is add to zip".
but it should zip that folder right...how to do it.
but it should zip that folder right...how to do it.
Re: using .bat to search the folder and compres files into z
START /belownormal /wait /D"C:\Program Files\7-Zip\" 7z.exe a -tzip -r- -mx5 "C:\path\to\output_file.zip" "C:\path\to\the\directory\you\want\to\zip\*.*"
santhosh, read the help on the command line of archiver
santhosh, read the help on the command line of archiver
Re: using .bat to search the folder and compres files into z
Thanks !k
i found it
START /belownormal /wait /min /D"C:\Program Files\WinRAR" winrar a -rr -r -ep1 -afzip "C:\Documents and Settings\Pretups2
\dat.rar" "C:\Documents and Settings\Pretups2\sat"
i found it
START /belownormal /wait /min /D"C:\Program Files\WinRAR" winrar a -rr -r -ep1 -afzip "C:\Documents and Settings\Pretups2
\dat.rar" "C:\Documents and Settings\Pretups2\sat"