Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using a batch file to create folder and copy files into it to multiple PCs

I have a folder with numerous files that I need to copy to multiple PCs on a network. I thought if the folder didn't exist it would automatically create it. Here's what I have...

copy "C:\Documents and Settings\follag\Desktop\Music" "\PC NAME\c$\Documents and Settings\All Users\Desktop\Music"

When I look at the destination PC, it is not creating the folder and copying the files. I'm new to this whole batch files and would appreciate any help.

Thanks,

Greg

like image 386
Greg Avatar asked May 20 '10 13:05

Greg


People also ask

How do I transfer files from one computer to another using command prompt?

Highlight the files you want to copy. Press the keyboard shortcut Command + C . Move to the location you want to move the files and press Command + V to copy the files.


1 Answers

Try

xcopy "C:\Documents and Settings\follag\Desktop\Music" "\PC NAME\c$\Documents and Settings\All Users\Desktop\Music" /E /I
like image 140
LittleBobbyTables - Au Revoir Avatar answered Oct 05 '22 13:10

LittleBobbyTables - Au Revoir