Skip to main content
gamedev.net
🔒 Locked

.bat question

Started by tekmoto May 21, 2006 at 12:44 AM 1 replies 400+ views
Original Post
tekmoto
tekmoto
Hey everyone, I am trying to create a .bat file that creates a folder (e.g., "tek") on my C:\Temp folder, then copy everything from my network-mapped drive (e.g., "Z:"). Everytime I log off one of my machines at work everything on my C:\temp folder gets deleted. We're given some space on a network folder, which I mapped to as my Z: drive. There's a lot of files and folders on my Z:. I thought I could make a .bat file that would do all the work for me of copying everything from my Z: to C:\temp\tek , but I don't know too much about dos commands. The following doesn't work: md C:\temp\tek copy Z:\*.* C:\temp\tek Anyone got a clue?
Endurion
Endurion
You don't say what is not working. I assume you mean subdirectories are not copied as well. You can use xcopy /E to do that:

md c:\temp\tek
xcopy z:\*.* c:\temp\tek /E
Fruny: Ftagn! Ia! Ia! std::time_put_byname! Mglui naflftagn std::codecvt eY'ha-nthlei!,char,mbstate_t>
cowsarenotevil
cowsarenotevil
What's wrong with what you have (does it give an error message?). Aside from the fact that the first line is not necessary, I don't see much wrong with that. Though I do believe in DOS you can't 'cd' between drives, you need to do 'z:' (or whatever) to switch to a different drive. I'm not sure if that holds true for copying, or if that's even true at all (I'm using Linux so I can't check right now) but it may be the problem.
-~-The Cow of Darkness-~-

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.