#150601 - 2005-10-26 08:46 AM
@error value after copy command
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
Hi all,
does the COPY command change the value of @error if it fails? It's not seeming to do it for me...
|
|
Top
|
|
|
|
#150602 - 2005-10-26 08:50 AM
Re: @error value after copy command
|
NTDOC
Administrator
   
Registered: 2000-07-28
Posts: 11634
Loc: Space
|
Works just fine for me.
Code:
Break On COPY C:\TEMP\A.TXT C:\ 'Copy error: ' + @ERROR + ' ' + @SERROR ? Copy error: 2 The system cannot find the file specified.
|
|
Top
|
|
|
|
#150603 - 2005-10-26 08:58 AM
Re: @error value after copy command
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
hmm...Here is my code: Code:
Copy "\\" + $LocalServer + "\dep\collect.exe" $CompatInstallDir $=LogToChangeLog(ReadProfileString($IniFile,"DISPLAY","Description") + " copying from " + $LocalServer,@SERROR,@ERROR)
The directory the copy is trying to go from doesn't exist, but my log file (which is written to by LogtoChangeLog) says it completes succesfully with @error = 0?
|
|
Top
|
|
|
|
#150604 - 2005-10-26 09:48 AM
Re: @error value after copy command
|
daniel1982
Getting the hang of it
Registered: 2005-03-23
Posts: 77
Loc: Sydney, Australia
|
ah, worked it out, @error is changed by ReadProfileString function...
Cheers!
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1471 anonymous users online.
|
|
|