stephengriffin
asked on
gzip on windows nt4 server batch file. No overwrite.
Hi ,
Nightly im copying over gz files from another server. Then uncompressing them with:
gzip -f -k -d c:\files\*.gz
If the folder already contains gz which it does , it overwrite the uncompressed file again each night ( i remove this on a regular basis but need to keep them for a week..)
When i remove the force swtich im asked to confirm yes/no for overwrite.
How do i build this into a Batch file?
Cheers!
Nightly im copying over gz files from another server. Then uncompressing them with:
gzip -f -k -d c:\files\*.gz
If the folder already contains gz which it does , it overwrite the uncompressed file again each night ( i remove this on a regular basis but need to keep them for a week..)
When i remove the force swtich im asked to confirm yes/no for overwrite.
How do i build this into a Batch file?
Cheers!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
in the script I set the current working directory to match the directory the files are in with this two lines:
c:
cd c:\files
change these as appropriate and the script should work as is.
c:
cd c:\files
change these as appropriate and the script should work as is.
^ should say "with THESE two lines:"
ASKER
ie the dir/b .. does this relate to a specific dir?