htetzaw
asked on
Create batch file to rename current folder, create new folder and zip the old folder and delete away if successful
Hi All ,I need help to create batch file to rename current folder, create new folder and zip the old folder and delete away if successful . For e.g. One application is using this folder D:/SMEX/spammail folder and I will like to rename that folder , zip it with current date, create the new folder with same name (spammail) and delete the old folder if successfully zipped .Is there any way to use the batch file for above process . Thanks in advanced ! I am going to use it on window 2000 server .
ASKER
Hi Gary, Thanks . The script is working but is there any way to generate the error msg and cancel everything if zipping fail and where should I see the error msg . Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Gary! I will test it tonite and will let you know the result !
* You want an alphabetical date format of YYYYMMDD (20090218)
* The Windows 2000 server is configured for US English
* You are using 7Zip as your zip archiver (my personal favorite) installed in C:\Program Files\7-Zip
Try something like this:
Open in new window