Command Prompt

Command Prompt – Windows Batch Script for Moving Files From One Drive to Another

150 150 rhecht


rem #first establish drive maps
net use x: pc1sharenamefolder1
net use y: pc2sharenamefolder2

#=============================================
# Use only if you want to clear the destination folder first!
#=============================================
#rem #now you delete the contents
#y:
#delete *.* /y
#=============================================

rem #now you copy the contents of folder1 to folder2 [/s is for subfolders if they exist]
xcopy x:*.* /s

exit

DOS Command Line Remove Non Empty Directory Without Fuss

150 150 rhecht

​rd “directoryname” /s /q

Bonus: for Linux:

rm -Rf “directoryname”

That’s all! Was that so hard? Only thing is, be careful!