Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.bat creation help

Status
Not open for further replies.

dtorres

MIS
Sep 25, 2002
177
US
I need to create a .bat file that users can run to copy multiple folders and all the contents inside the folders off their local system and have it copy them to a place on the network. They have personal space on the network which they see as the drive Y:\ on their computer. Could any one assit me on this?

Thank You

"D"
 
Copying could lag up your network. I would suggest you look into Offline Folders (setting up your users Y: to be an offline folder on the network), or third party software like XXCOPY which can do synchronizations on folders (and a whole lot more.. look it up on the web). The xxcopy can run in a batch file if you like, but the offfline folders is a part of Windows 2000 and can be setup via group policies or individually.. depending on the amount of users you may have.



"In space, nobody can hear you click..."
 
The .bat file is something a user can click on before their system is formatted with an XP image. There are just particular folders I need to copy. Only a few users will be running it at a time. The script is only going to run once to copy the folder up to the network.

"D"
 
hehe ok.. would of been good to mention that part too.. would of saved me a lot of typing:

XCOPY <source files> <destination> /S /E

Example: XCOPY c:\&quot;My Documents&quot; y: /s /e

/s= with Sub-Directories
/e= Empty sub-directories also

Do a XCOPY /? in a DOS windows to find all the commands.




&quot;In space, nobody can hear you click...&quot;
 
lol...sorry about that!

Thank You. Apprecaite the help! I'll give it a shot and see how it works.

Thanks again.

&quot;D&quot;
 
Is the an option to copy the folder or do I have to create the folder and then have the items copied to that particular folder. I used the following:

XCOPY c:\&quot;My Documents&quot; y: /s /e

and it placed all the individual files to the Y: drive rather in their folders.
 
Another question, I am trying to delete folders using my .bat file. Once the contents is copied out I want to remove the folder(s) from their network drive. Some of the folder names are longer than 9 characters for example:

y:\signatures

I am able to move the contents of the folder to their local system, but I am unable to delete the folder using DOS commands. I am not sure what needs to be added to the .bat file to del the folder.

I am running this script on a Windows 2000 and WinXP box.

Thanks

&quot;D&quot;
 
try to use the extention .CMD unstead of .BAT
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top