batch file help, moving files over network with a batch file |
![]() ![]() |
batch file help, moving files over network with a batch file |
Oct 11 2008, 02:20 PM
Post
#1
|
|
|
Member ![]() ![]() Posts: 76 OS: vista 64bit |
anywho I have my diagnostix machine (my main machine that never moves/changes) then I have 10 workstations on which I have computers coming and going every day. nearly everyone of these workstations needs to pull files from my diag machine so normally I just do the \\diagnostix\c$ in the run command with simple file sharing turned off and navigate my way to the files I want. I would liek to streamline this process since I pull the same files nearly every time. so I wrote a batch file to do it here's what I have so far QUOTE xcopy "%cd%\nero 7 install" "%USERPROFILE%\desktop\nero 7 install" /e /i /h xcopy "%cd%\office2003" "%USERPROFILE%\desktop\office" /e /i /h xcopy "%cd%\oem editor" "%USERPROFILE%\desktop\oem editor" /e /i /h xcopy "%cd%\avg free.exe" "%USERPROFILE%\desktop\" xcopy "%cd%\dd200.exe" "%USERPROFILE%\desktop\" xcopy "%cd%\firefox.exe" "%USERPROFILE%\desktop\" xcopy "%cd%\ncleaner.exe" "%USERPROFILE%\desktop\" xcopy "%cd%\spybotsd160.exe" "%USERPROFILE%\desktop\" xcopy "%cd%\spywareblastersetup41.exe" "%USERPROFILE%\desktop\" pause when the batch file is ran from the diagnostix machine everything works fine and the files go straight to the desktop. however when ran from one of the work stations the %cd% is changed to the local c:\windows\ and I cannot figure out how to fix that. any ideas? This post has been edited by pr0n: Oct 11 2008, 02:21 PM |
|
|
Oct 15 2008, 01:44 AM
Post
#2
|
|
![]() Trusted Tech Posts: 1,548 From: Steenwijk, The Netherlands OS: Windows XP SP2; Windows Vista Ultimate SP1 |
Hello there,
What is %cd% supposed to refer to? The CD Drive? Just to sum it up for my knowing. You want to copy files from your diagnostics 'server' to the workstations? So this needs to be dynamic and you want to do it through running a batch? Regards, Olrik |
|
|
Oct 16 2008, 11:11 AM
Post
#3
|
|
|
Member ![]() ![]() Posts: 76 OS: vista 64bit |
%cd% means current directory so whatever directory the batch is ran from that's what will be put there. so if I have the batch in c:\windows\ %cd%=c:\windows\ likewise if the batch is on the dsektop it would be c:\docs and setts\user\desktop\ the problem is when I run it from a remote computer it doesn't do \\diagnostix\c$ instead it defaults to local computer c:\windows> yeah normally I have to go through a mess of files and select anywere from 10 to 30 different files each time I work on a computer and move them. it would be nice if I had an automated process for the more popular sets that I move
|
|
|
Oct 16 2008, 04:37 PM
Post
#4
|
|
![]() Trusted Tech Posts: 1,548 From: Steenwijk, The Netherlands OS: Windows XP SP2; Windows Vista Ultimate SP1 |
You can use the MAP command to open network drives. Use the map command to open a drive to your server, then you can let your batch file run from there.
If you need an example (or the actual complete batch), just ask. Regards, Olrik |
|
|
Oct 16 2008, 05:31 PM
Post
#5
|
|
|
Member ![]() ![]() Posts: 76 OS: vista 64bit |
yeah you could give an example that would be great.
|
|
|
![]() ![]() |
Similar Topics
| Topic Title | Replies / Views | Topic Information | |||||
|---|---|---|---|---|---|---|---|
![]() |
2 / 400 | 4th November 2005 - 09:28 PM FGM started - last by Swandog46 |
|||||
![]() |
0 / 288 | 3rd August 2006 - 08:10 AM Preeko started - last by Preeko |
|||||
![]() |
8 / 301 | 13th April 2007 - 06:26 AM stettybet0 started - last by dsenette |
|||||
![]() |
12 / 415 | 7th May 2008 - 05:32 AM Sera started - last by Sera |
|||||
|
Time is now: 7th January 2009 - 10:59 PM |
| Advertisements do not imply our endorsement of that product or service. The forum is run by volunteers who donate their time and expertise. We make every attempt to ensure that the help and advice posted is accurate and will not cause harm to your computer. However, we do not guarantee that they are accurate and they are to be used at your own risk. |