"move" command WITH prompt if target exists?
Posted: 25 Sep 2022 11:41
Ok, I could move one or multiple files or folders on the command line in a batch script by a command like
move /y \"%1\" \"D:\mydata\\"
Unfortunately all files/folders are moved regardless if the target files/folders exist or not.
How can I extend the command above so that a prompt appears if the files/folders exists and ask me if I want to overwrite them?
move /y \"%1\" \"D:\mydata\\"
Unfortunately all files/folders are moved regardless if the target files/folders exist or not.
How can I extend the command above so that a prompt appears if the files/folders exists and ask me if I want to overwrite them?