Page 1 of 1 1
Topic Options
#154227 - 2005-12-29 06:09 PM Problem with COPY
sascha Offline
Fresh Scripter

Registered: 2005-12-29
Posts: 5
Loc: Germany
Sorry if my question is too easy for all of you, but I don't have any ideas on it.
I'm trying to copy some files at logon from a server's share to local drive
Code:
 COPY "\\server\share\grp\element\*.*" "%TEMP%\Startmenu\Programme\*.*" /s 


this one always returns ERROR 3 (Path not found)

if I do it with the shell command like this it works
Code:
SHELL "cmd /c xcopy \\server\share\grp\element\*.* %TEMP%\Startmenu\Programme\*.* /s"  



the one with the copy command also works on a windows server 2003 when a user logs on via terminal services, but when a user logs on locally to a w2k pro it fails.

any ideas?`

Thanks sascha

Top
#154228 - 2005-12-29 09:33 PM Re: Problem with COPY
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
Not right off hand, but put some error code checking in there and verify that the path exists without using the copy command - just pipe it to the console to see what the script is seeing.

Verify that the path is available during logon. Maybe the path is not ready during logon yet.

Top
#154229 - 2005-12-29 09:47 PM Re: Problem with COPY
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
Try removing the *.* on the destination path
Top
#154230 - 2005-12-29 09:55 PM Re: Problem with COPY
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
I am pretty sure the problem is exactly as the error message says, namely that the destination path does not exist.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#154231 - 2005-12-29 10:06 PM Re: Problem with COPY
Stanley Offline
Starting to like KiXtart

Registered: 2004-06-03
Posts: 130
Loc: Upstate NY, USA
is /s a valid COPY switch?
_________________________
Taxation WITH representation isn't so hot, either!

Top
#154232 - 2005-12-29 10:51 PM Re: Problem with COPY
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Does nobody read the manual anymore!
It does indicate that /s is a valid switch and it also clearly states that:
Quote:

; If the target (directory) does not exist, and the target specification ; does not have a trailing backslash, COPY will fail with
; errorcode 3 ("path not found")



_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#154233 - 2005-12-29 11:42 PM Re: Problem with COPY
NTDOC Administrator Offline
Administrator
*****

Registered: 2000-07-28
Posts: 11634
Loc: Space
What version of KiXtart are you using?

If XCOPY works as you've shown/stated then that leads me to believe that you have an older possibly broken version of KiXtart.
 

Top
#154234 - 2005-12-30 08:39 AM Re: Problem with COPY
sascha Offline
Fresh Scripter

Registered: 2005-12-29
Posts: 5
Loc: Germany
Hi all,

first of all, thanks for all the replies, I found the problem somewhere else in the script, it seemed to be a timing problem wit the directory creation. Somehow xcopy seems to create the directory if it is not existend.

Sorry for inconveniences, but still have to mention, that I DID read the manual ;-)


Sascha

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1046 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.063 seconds in which 0.026 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org