taz742 Posted April 2, 2008 Posted April 2, 2008 (edited) Is there a maximum limitation for filename's lenght parameter in the RunWait() function? RunWait ( "filename" [, "workingdir" [, flag]] ) Edited April 2, 2008 by taz742
martin Posted April 2, 2008 Posted April 2, 2008 Is there a maximum limitation for filename's lenght parameter in the RunWait() function? RunWait ( "filename" [, "workingdir" [, flag]] )I would guess it is set by the environmental variable MAX_PATH which I think is 260 characters. I would expect that it is limited by windows not by AutoIt. Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
weaponx Posted April 2, 2008 Posted April 2, 2008 The Windows limitation for filenames is 255 characters I thought. I was only able to write 214 characters to a filename (excluding the extension). This code will attempt to create the highest possible filename and show you the result: $file = "" For $X = 1 to 300 $file &= "A" $result = FileWrite($file & ".txt", "TEST") If $result = 0 Then MsgBox(0,"","FAIL at " & $X & " characters") Exit EndIf FileDelete($file & ".txt") Next
taz742 Posted April 2, 2008 Author Posted April 2, 2008 (edited) Thanks for replies but this isn't what i'm waiting. I know the filefullpath limitation for windows is 255 characters. @weaponx: with your script located in "c:\" it failed at 252 so 251 + 4 ('.txt' lenght) = 255. this confirm the 255 characters limitation for filepath. I use RunWait() to run executable program with multi parameters and by this way the lenght of my "filename" parameter is more than 255. I've test this lenght and AutoIt failed to RunWait with more than 4096 characters' lenght. So i think this AutoIt limitation is define by CMDLINEPARAM_MAXLEN = 4096 in the help Edited April 2, 2008 by taz742
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