InterviewSolution
| 1. |
Solve : Help me on this batch file? |
|
Answer» I am TRYING to increment a folder over a network for example I created BK1 next will be BK2 for backups of files here is the code, the problem is only increment 1 folder but the next it KEEPS saying folder already exist and skipped all my backups, bellow is my code, what am I missing? please help I don't see the %drive1% variable ever get defined anywhere. sorry that should be %desti1% and still doest work... on the %desti1% it should add a folder Backup1 and when I run buckup the next day I will write Backup2 and so on, I will have a backup for every day still not done with the code but I will add to delete backup of X days old but I need to fix this problem first... please help me solve this issueDo you realize that batch does not sort in numeric order. If you have 10 backups and run the dir command your output will look like this. Code: [Select]Backup1 Backup10 Backup2 Backup3 etc......Personally I think you should name your backups by date in a YYYYMMDD format. That way you don't have to screw around with figuring out your last backup number. |
|