Page 1 of 1
Compress RAR with Password
Posted: 04 Nov 2009 09:44
by tirano
ex:
i have folder
f1 = 001
f2 = a01
f3 = ab
f4 = 4
all folder have file pdf i try use code in bellow it can compress but copy file bat to all folder
for %%I in (*.pdf) do "%ProgramFiles%\WinRAR\WINRAR.exe" a -ep1 -r -v102400 "%%I.rar" -ibck "%%I" -hp"khmerw"
i 1 run 1 bat compress all file in folder and not change path
ex:
f1 = 001\khmer.pdf
=> f1 = 001\khmer.rar
f2 = a01\learn.pdf
=> f2 = a01\learn.rar
Posted: 07 Nov 2009 07:11
by tirano
Posted: 08 Nov 2009 05:18
by !k
I misunderstood your English, but maybe this is what you need?
Code: Select all
for %%I in (001\*.pdf a01\*.pdf ab\*.pdf 4\*.pdf) do start "" "%ProgramFiles%\WinRAR\WINRAR.exe" a -ep1 -r -v102400 "%%I.rar" -ibck "%%I" -hp"khmerw"
Posted: 08 Nov 2009 17:44
by tirano
sorry sir my english poor
thnx for reply
for %%I in (
001\*.pdf
a01\*.pdf
ab\*.pdf 4\*.pdf) do start "" "%ProgramFiles%\WinRAR\WINRAR.exe" a -ep1 -r -v102400 "%%I.rar" -ibck "%%I" -hp"khmerw"
all text bold generate all time when compress file.
i need
Posted: 09 Nov 2009 07:39
by !k
Code: Select all
for /f %%I in ('dir /b /s *.pdf') do start "" "%ProgramFiles%\WinRAR\WINRAR.exe" a -ep1 -r -v102400 "%%I.rar" -ibck "%%I" -hp"khmerw"
Posted: 09 Nov 2009 08:51
by tirano
thnx
how to create have function wait to archive. (run 1 by 1, not run all)
Posted: 09 Nov 2009 09:15
by !k
More better
Code: Select all
for /f %%I in ('dir /b /s *.pdf') do start "" /wait "%ProgramFiles%\WinRAR\WINRAR.exe" a -t -df -ep1 -r -v102400 -ibck -hp"khmerw" -- "%%I.rar" "%%I"
Posted: 09 Nov 2009 09:24
by tirano
i have 1 problem
folder have space of file name and folder
Posted: 10 Nov 2009 06:52
by tirano
!k wrote:More better
Code: Select all
for /f %%I in ('dir /b /s *.pdf') do start "" /wait "%ProgramFiles%\WinRAR\WINRAR.exe" a -t -df -ep1 -r -v102400 -ibck -hp"khmerw" -- "%%I.rar" "%%I"
thank big man
Posted: 10 Nov 2009 21:14
by tirano
!k wrote:More better
Code: Select all
for /f %%I in ('dir /b /s *.pdf') do start "" /wait "%ProgramFiles%\WinRAR\WINRAR.exe" a -t -df -ep1 -r -v102400 -ibck -hp"khmerw" -- "%%I.rar" "%%I"
change -df to -dr for move file to recycle bin