Guest Slingshotz Posted October 3, 2007 Posted October 3, 2007 This is driving me nuts and I have not been able to find any answers on any user group. This is a basic batch file script that I am deploying through group policy in the startup script to copy templates from the server to the local machine. I'm deploying it during the startup so that every computer gets it, regardless of who logs in. ========================= if NOT exist "C:\Templates" md "C:\Templates" pushd "\\servername\Templates\" xcopy *.dot C:\Templates /Y /D popd ========================= The script works perfectly when run by itself, but during the startup script when a computer starts up it keeps saying that *.dot is not found. ========================= File not found - *.dot 0 File(s) copied ========================= When I replace the xcopy with a regular copy command, it works during startup but I need to only copy the files when there are newer templates on the server and thus have to use xcopy. I have confirmed that the computer has permisisons to copy from the server share (it obviously works as the copy command works). I have also tried it without the pushd commands to no avail, i.e. ========================= if NOT exist "C:\Templates" md "C:\Templates" xcopy \\servername\Templates\*.dot C:\Templates /Y /D ========================= The error message is the same, it says file not found. And I have confirmed that xcopy is working on the target machine. Like I said, it works fine on it's own, but when deployed through group policy it won't copy the files (but it makes the folder ok). Any suggestions would be greatly appreciated as I've burnt many hours trying to figure out this silly little problem.
Guest +Bob+ Posted October 4, 2007 Posted October 4, 2007 Re: Problems with Xcopy in startup script On Wed, 03 Oct 2007 16:01:58 -0700, Slingshotz <slingshotz@yahoo.com> wrote: >Any suggestions would be greatly appreciated as I've burnt many hours >trying to figure out this silly little problem. This might be entirely too basic, but have you set the location (cd \someplace) in the stream ?
Guest Pegasus \(MVP\) Posted October 4, 2007 Posted October 4, 2007 Re: Problems with Xcopy in startup script Multi-posted. http://www.blakjak.demon.co.uk/mul_crss.htm "Slingshotz" <slingshotz@yahoo.com> wrote in message news:1191452518.579446.54610@r29g2000hsg.googlegroups.com... > This is driving me nuts and I have not been able to find any answers > on any user group. This is a basic batch file script that I am > deploying through group policy in the startup script to copy templates > from the server to the local machine. I'm deploying it during the > startup so that every computer gets it, regardless of who logs in. > > ========================= > if NOT exist "C:\Templates" md "C:\Templates" > pushd "\\servername\Templates\" > xcopy *.dot C:\Templates /Y /D > popd > ========================= > > The script works perfectly when run by itself, but during the startup > script when a computer starts up it keeps saying that *.dot is not > found. > > ========================= > File not found - *.dot > 0 File(s) copied > ========================= > > When I replace the xcopy with a regular copy command, it works during > startup but I need to only copy the files when there are newer > templates on the server and thus have to use xcopy. > > I have confirmed that the computer has permisisons to copy from the > server share (it obviously works as the copy command works). I have > also tried it without the pushd commands to no avail, i.e. > > ========================= > if NOT exist "C:\Templates" md "C:\Templates" > xcopy \\servername\Templates\*.dot C:\Templates /Y /D > ========================= > > The error message is the same, it says file not found. And I have > confirmed that xcopy is working on the target machine. Like I said, > it works fine on it's own, but when deployed through group policy it > won't copy the files (but it makes the folder ok). > > Any suggestions would be greatly appreciated as I've burnt many hours > trying to figure out this silly little problem. >
Guest +Bob+ Posted October 5, 2007 Posted October 5, 2007 Re: Problems with Xcopy in startup script On Thu, 4 Oct 2007 10:30:26 +0200, "Pegasus \(MVP\)" <I.can@fly.com> wrote: >Multi-posted. >http://www.blakjak.demon.co.uk/mul_crss.htm > >"Slingshotz" <slingshotz@yahoo.com> wrote in message >news:1191452518.579446.54610@r29g2000hsg.googlegroups.com... Top posted :-)
Recommended Posts