• We’re currently investigating an issue related to the forum theme and styling that is impacting page layout and visual formatting. The problem has been identified, and we are actively working on a resolution. There is no impact to user data or functionality, this is strictly a front-end display issue. We’ll post an update once the fix has been deployed. Thanks for your patience while we get this sorted.

need help writing a .bat for NT4.0

JCROCCO

Senior member
I need to write a batch file to copy numerous files accross the network with different folders (and subfolders) to a common directory for ease of making a CD of those files.

I already have made one, and works good except it wont copy and create the subfolders or their files.

I tried to use XCOPY but got command errors.

Any way to do this?

thanks
 
Are you going to be running this .bat from the machine with the common folder?

Edit:

It's going to be a lot of typing at first, but as long as you're running it on the machine you're copying the files to, do a whole bunch of lines like this:

copy \\servername\folder\subfolder\file.txt C:\copytofolder

All files in the same folder:

copy \\servername\folder\subfolder\*.* C:\copytofolder

All .txt files in the same folder:

copy \\servername\folder\subfolder\*.txt C:\copytofolder

All files in a folder

copy \\servername\folder\subfolder\ C:\copytofolder


 
No, the common folder is also on a network drive.

Also, some directories have hundreds of subfolders.

I was reading the help on NT and it says it can do xcopy, but I need to troubleshoot it i guess

thanks
 
If it's on a different PC that's not a problem just change:

c:\copytofolder

To

\\servername\copytofolder

Yeah, copy won't do subfolders.
 
Back
Top