Backup File
Posted: 04 Aug 2010 03:55
I want to create a bat file to create backup of a file. Bat file will get the file as parameter and then it will create a backup by copying it with a different name.
For Example
mybat.bat index.asp
will create index_1.asp
I did this. But the problem is that I want to have a check system while copying file.
if index_1.asp exists then it will create index_2.asp instead of index_1.asp
And the index will increase until the file not exists. I did something but
IF NOT EXISTS always gives me error.
THX FOR HELP.
For Example
mybat.bat index.asp
will create index_1.asp
I did this. But the problem is that I want to have a check system while copying file.
if index_1.asp exists then it will create index_2.asp instead of index_1.asp
And the index will increase until the file not exists. I did something but
IF NOT EXISTS always gives me error.
THX FOR HELP.