Topic: 7zip command line question and System Variables? (Page 1 of 1) |
|
---|---|
Maniac (V) Inmate From: there...no..there..... |
posted 10-24-2008 20:04
Greetings all. I am using 7zip to compress some files via batch script. Here is the batch script code: @echo off set tdtd=none set ttrn=none for /F "tokens=2-4 delims=/ " %%i in ('date /t') do set tdtd=%%i%%j%%k for /F "tokens=5-8 delims=:. " %%i in ('echo.^| time ^| find "current" ') do set ttrn=%%i%%j%%k%%l set tufn=%tdtd%%ttrn% 7z a -tzip %tufn%.zip @listfile.txt
code: copy *.zip "C:\Program Files\7-Zip\backup"
|
Paranoid (IV) Inmate From: Umeå, Sweden |
posted 10-24-2008 20:42
About the first question: Is the current path the same as the path you are producing the archive files in? If the answer is yes, I'm a bit stumped for ideas. It could be that 7zip just starts the compression in the background and returns directly and thus hasn't created the archives yet, but that's unlikely for a command line tool. |
Maniac (V) Inmate From: there...no..there..... |
posted 10-24-2008 22:02
thanks liorean, |
Maniac (V) Inmate From: there...no..there..... |
posted 10-24-2008 22:31
OK...after adding it to the system variable (correctly I might add), restarting the computer, it now all works with one file just like it should. |
Maniac (V) Inmate From: there...no..there..... |
posted 10-31-2008 15:07
OK...the script works, but, if I am not logged into the computer, the Scheduled Task that I set up does not start. quote:
|