Welcome Guest ( Log In | Register )

      
Discover the best free computer help!
Learn more about Geeks to Go by taking the tour. Spyware, virus, trojan, fake security or privacy alerts? Read the malware cleaning guide.
 
Reply to this topicStart new topic
batch file help, moving files over network with a batch file
pr0n
post Oct 11 2008, 02:20 PM
Post #1


Member
**
Posts: 72
OS: vista 64bit



I posted this once before (yesterday in the wind XP section) but the post has completely disappeared I dunno if it was deleted or what.

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
Go to the top of the page
 
+Quote Post
Artellos
post Oct 15 2008, 01:44 AM
Post #2


Tech Apprentice
Group Icon
Posts: 1,476
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
Go to the top of the page
 
+Quote Post
pr0n
post Oct 16 2008, 11:11 AM
Post #3


Member
**
Posts: 72
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
Go to the top of the page
 
+Quote Post
Artellos
post Oct 16 2008, 04:37 PM
Post #4


Tech Apprentice
Group Icon
Posts: 1,476
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
Go to the top of the page
 
+Quote Post
pr0n
post Oct 16 2008, 05:31 PM
Post #5


Member
**
Posts: 72
OS: vista 64bit



yeah you could give an example that would be great.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Collapse

> Similar Topics

    Topic Title Replies / Views Topic Information
No New Posts   2 / 369 4th November 2005 - 09:28 PM
FGM started - last by Swandog46
No New Posts   0 / 268 3rd August 2006 - 08:10 AM
Preeko started - last by Preeko
No New Posts   8 / 270 13th April 2007 - 06:26 AM
stettybet0 started - last by dsenette
No New Posts   12 / 375 7th May 2008 - 05:32 AM
Sera started - last by Sera

RSS Time is now: 2nd December 2008 - 05:52 AM
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.