memnon Posted September 17, 2007 Share Posted September 17, 2007 Hello, i made a script what copies a directory from a server to a client. DirCopy("d:\1234", "\\" & $element & "\c$\1234", 1) ...$element is the clientname... well it seems, that copiing the dir is working fine, but if i check the @errorlevel i get an error back if @error=1 then $copy=" -> copy ok!" Else $copy=" -> copy failed" endif --> always get "copy failed" back anyway to debug this failure ? cant get it out... could it be that there are opened files are a problem and WHEN, how can i resolve my problem then ? das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum? Link to comment Share on other sites More sharing options...
ResNullius Posted September 17, 2007 Share Posted September 17, 2007 According to the help file, DirCopy doesn't set @error, it just gives a return value: Return Value Success: Returns 1. Failure: Returns 0 if there is an error copying the directory.So you want something like: $DirCopied = DirCopy("d:\1234", "\\" & $element & "\c$\1234", 1) ...$element is the clientname... if $DirCopied =1 then $copy=" -> copy ok!" Else $copy=" -> copy failed" endif Link to comment Share on other sites More sharing options...
memnon Posted September 17, 2007 Author Share Posted September 17, 2007 (edited) According to the help file, DirCopy doesn't set @error, it just gives a return value: So you want something like: $DirCopied = DirCopy("d:\1234", "\\" & $element & "\c$\1234", 1) ...$element is the clientname... if $DirCopied =1 then $copy=" -> copy ok!" Else $copy=" -> copy failed" endif thx, working BTW.... is it in all function (also user declared functions !!) so, that positive =1 ? Edited September 17, 2007 by memnon das beste Windows Support Forum: Windows 2000 Helpline und tschüss den WindowsfehlernProgrammieren: Autoit 3 - wer braucht noch VBS ?!Programmieren: Autoit 3 Forum? Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted September 17, 2007 Moderators Share Posted September 17, 2007 (edited) thx, workingBTW.... is it in all function (also user declared functions !!) so, that positive =1 ?No, you'll need to read the UDF's you get off this site to see what they return and how.If you're talking about regular built in functions, just read the help file to see what they return, may be a boolean such as 1 for true, maybe an array, so your best bet is to read first, use 2nd. Edited September 17, 2007 by SmOke_N Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now