I've got a piece of software that includes its own backup utility, but it generates folder names with the current date and time appended. I'd like to write batch script that will remove the date/time part of the folder name

essentially I'd like to rename c:\my folder\backup12345\ to c:\my folder\backup\

I've tried the obvious:

ren "c:\my folder\backup*" "backup"

which returns "The syntax of the command is incorrect."

This feels like it should be so simple, but I can't work out why it won't work

link|improve this question
feedback

1 Answer

Turns out the answer was very simple:

move "c:\my folder\backup*" "c:\my folder\backup"

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.