Link to home
Start Free TrialLog in
Avatar of wilsonhinds
wilsonhinds

asked on

Batch Files

How to create a batch file to move files from one location to another?
ASKER CERTIFIED SOLUTION
Avatar of rseabird
rseabird
Flag of Netherlands image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of duckbert
duckbert

You may need to go to My Computer >  Tools > Folder Options > View
Uncheck "Hide extensions for known file types"

Now you can rename the text file.

If you want to use it to do a backup the xcopy command is fairly useful

type in something like

Now create a blank text file (right click > new > New Empty Text File)

Rename it to copy.bat

then type the follwing in the file - replacing the path ie c:\ with where you want to copy from & to
xcopy "c:\test" "d:\test" /d /s /c /y

This will copy all the files in a directory to a new one, it will also copy all the files that have changed since the last time you ran the command (incremental backup) it will keep copying if errors occur - files that are in use and it will overwrite the destination without prompting

This method just makes things easy

-----
http://www.ryanknell.com.au