Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

FileOpen $FO_CREATEPATH doesnt work

$
0
0

The FileOpen help file gives these options:

 

[optional] Mode to open the file in.
Can be a combination of the following:
    $FO_READ (0) = Read mode (default)
    $FO_APPEND (1) = Write mode (append to end of file)
    $FO_OVERWRITE (2) = Write mode (erase previous contents)
    $FO_CREATEPATH (8) = Create directory structure if it doesn't exist (See Remarks).
 
and some more options.
 
But this simple code just doesn't work:
dim $hFileOpen
$hFileOpen  = FileOpen ( "c:\test\test.txt", $FO_CREATEPATH )
If $hFileOpen = -1 Then
        MsgBox($MB_SYSTEMMODAL, "", "An error occurred when creating/opening the file.")
        Return False
    EndIf
FileClose($hFileOpen)
 
 
Is the FO_CREATEPATH mode not implementen? Found it weird nobody on the forum ever encountered this...

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>