It’s been a long time since I’ve created any batch files.
What I’m trying to do is delete an entire folder, and then copy another folder (and it’s sub folders and files) to the location where I deleted the original file (this is a backup process).
I’ve run into three problems:
- the batch file prompts me when it runs the delete operation and this needs to happen “behind the scenes” so I can’t be prompted.
- the
del "c:\my folder location\myfoldertodelete"only deletes the files within that folder - the
copy "c:\my other folder location\myotherfolder" "c:\my folder location\"only copies the files within that folder, not the sub directories.
I assume I need xcopy or something but I’ve never used that. If anyone can help me jump through these three hoops, I’d greatly appreciate it.
edit: (updating with the copy command that isn’t working
C:\Users\Chris>copy /s "C:\Users\Chris\Documents\Visual Studio 2010\Projects
\new project" "D:\VS 2010 projects\Projects\"
The syntax of the command is incorrect.
1 Answer