Graph_Design Posted May 22, 2004 Share Posted May 22, 2004 #1 How can a delete a directory and replace it with an otherExample: c:/dossier autres/movie collectors/template(I want to delete "template" directory and replace it with an other "template" directory")#2 How can a delete a file in a directory and replace is with an other (well technicly is the same question but hmmm mabey it's not the same technic )thankssssssss Link to comment Share on other sites More sharing options...
spachtler Posted May 22, 2004 Share Posted May 22, 2004 deleting a directory:RD /S /Q "c:\dossier autres\movie collectors\template\"if the path contains spaces like in the above example,you have to use " " to define the path.create a directory:md "c:\dossier autres\movie collectors\template" Link to comment Share on other sites More sharing options...
Boox Posted May 22, 2004 Share Posted May 22, 2004 deleting a file:del /f "c:\programs\testfile.txt"copying a file:copy /y "d:\xpcd\testfile.txt" "c:\programs\testfile.txt"With the copy-command you can simply overwrite an existing file (don't forget the /y-switch!), so you have not to delete the original file first!I hope, that's what you're looking for Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now