batch file syntax

  • Thread starter Thread starter C.M.G.
  • Start date Start date
C

C.M.G.

The following batch file copies files from one directory to another, on the
same HD:

copy "C:\folder1\*.*" "C:\folder2"

My question is: what is the proper syntax to send the files to a directory
on a different computer that is networked with the source computer?

Thanks for your help.

Clem.
 
Doug,

That works great, thanks a lot.

Is there an expression that would also copy all the folders, and not just
the files, contained within the source folder?

Thanks again,

Clem.

Copy "C:\folder1\*.*" "\\<computername>\<sharename>\<foldername>"
 
C.M.G. said:
The following batch file copies files from one directory to another,
on the same HD:

copy "C:\folder1\*.*" "C:\folder2"

My question is: what is the proper syntax to send the files to a
directory on a different computer that is networked with the source
computer?


In addition to Doug's answer, if you map the network drive to a drive
letter, you can move files back and forth between the two computers, using
"DOS" commands or Windows Explorer, just as if the other computer's drive
was local.
 
Use XCOPY instead of COPY. XCOPY /? will give you all the command line options.
 
Doug,

That takes care of it. Thanks!

Clem.

Use XCOPY instead of COPY. XCOPY /? will give you all the command line
options.

--
Doug Knox, MS-MVP Windows Media Center\Windows Powered Smart
Display\Security
Win 95/98/Me/XP Tweaks and Fixes
http://www.dougknox.com
 
C.M.G. said:
Ken,

Thanks for your response. How do I map the network drive to a drive letter?

NET USE K: (drive letter of choice) \\SERVERNAME\SHARENAME

--

Bruce Chambers

Help us help you:



They that can give up essential liberty to obtain a little temporary
safety deserve neither liberty nor safety. -Benjamin Franklin

Many people would rather die than think; in fact, most do. -Bertrum Russell
 
Back
Top