The Courage Dog Posted January 15, 2010 Posted January 15, 2010 Hi, i do maintaning the cad system in our company, i have created certain folder with sub-folders & i want to copy these folder & sub-folder to all can machines to their local drive C:\ (50 numbers), instead of going to each machine & copy the folders one by one, is there any batch file that can automate this process by just running the batch file by the users then it will automatically copied folders to ther local machines in c drive C:\. your idea needed, thanks the courage dog Quote
NBC Posted January 15, 2010 Posted January 15, 2010 Can I ask why you are copying folders to users' local hard drives when there is potential that they could modify them in some way further down the line ? Surely, the best way to manage a cad system is to have all shareable content in one place on a server that is only modifyable by one person (or a selected number of people) Quote
Patrick Hughes Posted January 15, 2010 Posted January 15, 2010 I would have to agree with NBC, it sounds like a recipe for disaster. I can only imagine doing this with support files that do not require modification and locking access rights after the copy. But even still, maintainng would be difficult should you decide a change needed to be made. Quote
todouble22 Posted January 15, 2010 Posted January 15, 2010 Hi, i do maintaning the cad system in our company, i have created certain folder with sub-folders & i want to copy these folder & sub-folder to all can machines to their local drive C:\ (50 numbers), instead of going to each machine & copy the folders one by one, is there any batch file that can automate this process by just running the batch file by the usersthen it will automatically copied folders to ther local machines in c drive C:\. your idea needed, thanks the courage dog you could do something like this. *untested* just replace the drive letters that you need. and the files that you want in this example its just for .dwg and save it as a .bat file and run it. I'd suggest doing a test first... xcopy h:\*.dwg c:\*.dwg /d /s Quote
todouble22 Posted January 15, 2010 Posted January 15, 2010 ohh and you're on a network I assume so you'll have to add in mapping to the usernames like %username% Quote
The Courage Dog Posted January 15, 2010 Author Posted January 15, 2010 one major reason why i want to save the folders in drive c:\ we want to save space in the server as much as we could. Backup (.BAK) drawings can be set automatically to save it to local drive c:\, also the temporary drawing file & temporary reference files for ease retrival. Quote
nukecad Posted January 15, 2010 Posted January 15, 2010 Why not attach it to an e-mail and send it to all users telling them to save it to their own C drives? Quote
PatrickMc Posted February 16, 2010 Posted February 16, 2010 You can use this scripting approach to copy an entire folder structure from a local computer to several workstations automatically at once. Create a list of computers on the network in a file C:/List.txt, one entry per line. The entry may contain the hostname or the ip address of the workstation. Here is a quick script. # Script CopyToWorkstations.txt var str sourcefolder, destfolder, wkstnlist, wkstn, cmd # Read the workstn list into a string variable. cat "C:/List.txt" > $wkstnlist # Get the first wkstn. lex "1" $wkstnlist > $wkstn # Go thru wkstns one by one. while ($wkstn <> "") do # Create the robocopy command. set $cmd="robocopy /E \""+$sourcefolder+"\" \"\\\\"+$wkstn+"\\C$\\"+$destfolder+"\"" # Execute robocopy. system -s $cmd # Get the next wkstn. lex "1" $wkstnlist > $wkstn done This script is in biterscripting. Save the script to file "C:/Scripts/CopyToWorkstations.txt". Run it with this command. script "C:/Scripts/CopyToWorkstations.txt" sourcefolder("C:/Test1") destfolder("/Test2") Will copy the entire folder structure under C:/Test1 on the local computer to the folder C:/Test2 on each of the computers listed in file C:/List.txt. I use things like this daily. Once you master a script like this, you can keep reusing it. Quote
BIGAL Posted March 2, 2010 Posted March 2, 2010 We have had problems in the past about space on the server and the best answer is good house keeping by everyone. We have a working directory and completed directories, the completed are searched for bak log dwl sv$ plt and these are deleted. The savings can be big. The other thing is purging your drawings and making sure you have no junk in the drawing, often I find our guys have stuff copied from other drawings and not removed, we have add on software and it creates extra layout tabs I found 12 in one drawing not required. Do you have pdfs of every drawing ? Look at a better auto system when required. Also there are some big overheads in Autocad DWGS if its a simple drawing dont use your C3D template it holds an enourmaous amount of stuff you can not delete. Wblock works wonders on simple drawings. Check your templates make sure they are not full of hidden unused blocks. Look here lots of posts re dwg size a typical reduction is around 50%+. Quote
alanjt Posted March 2, 2010 Posted March 2, 2010 Would this help? http://www.cadtutor.net/forum/showpost.php?p=305105&postcount=62 Quote
DNK Posted March 2, 2010 Posted March 2, 2010 I distribute a compiled batch file that copies all support files (blocks, templates, .cui) from a specified location to each local hard drive. All of the paths are the same on all the end users' machines. It's not reasonable for all to pull from the server, because we have a lot of remote engineers and CAD, and to expect them to only be able to work when connected via VPN is ludicrous. I have employed this technique, and have an added gem of creating a log file that copies up to point on the server, so that I know who has updated, and who has not (trust but verify). I'd be happy to assist you in creating a similar batch file (and provide you a link to a free compiler so the batch can't be manipulated). Hit me up on PM. DNK Quote
MikeScott Posted March 11, 2010 Posted March 11, 2010 Here's a single line batch file that does what you want with a minimum of fuss: copy \\Server\CAD\*.* C:\CAD\*.* Put it in notepad and save it as "testing.bat".. email it to each user and get them to click on it from their desks. (note.. you may have better luck renaming the file AFTER you save it.. because it sometimes wants to name it "testing.bat.txt" whihc isn't going to work) You might need to create the folder on the destination drive, but if that's the case, you just add three lines ahead of that copy line. (put the correct backslash in there): C: cd \ md CAD C: This line chooses the drive cd \ This line ensures you're at the root of the drive. md CAD This line creates the folder there (in this case C:\CAD\) oh.. and the \\server bit is the path name to the name of our server. You don't need one for the destination computer as long as you're running this batch file ON the destination computer. To run the Batch file, just double click on it. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.