Matthy Posted August 2, 2007 Share Posted August 2, 2007 (edited) Hi, i am making a program that Writes peaces of code and saves it in a file just a text file but i was wondering if there was a function like filecreate? in the help i see Related FileOpen FileClose, FileReadLine, FileWriteLine, FileRead meaby it is possible with ShellExecute but does anyone knows the paremeters ; Open Notepad ShellExecute("Notepad.exe") ; Open a .txt file with it's default editor ShellExecute("myfile.txt", "", @ScriptDir, "edit")oÝ÷ ÚÊ-ê®zËb¢x¬È¦"nW¢f¤y«^Æ×âà¡yêì1«m%¨¢Ø¡j÷·w'èºwl¢g)àjëh×6_filecreate(@scriptdir & "\test.txt") but do you need to include something it is a udf? Edited August 2, 2007 by Matthy Link to comment Share on other sites More sharing options...
Danny35d Posted August 2, 2007 Share Posted August 2, 2007 Right from the HELP FILE. Creates or zero's out the length of the file specified. #include <File.au3> _FileCreate ( $sFilePath ) Parameters $sFilePath Path and filename of the file to be created. AutoIt Scripts:NetPrinter - Network Printer UtilityRobocopyGUI - GUI interface for M$ robocopy command line Link to comment Share on other sites More sharing options...
Matthy Posted August 2, 2007 Author Share Posted August 2, 2007 Right from the HELP FILE. Creates or zero's out the length of the file specified. #include <File.au3> _FileCreate ( $sFilePath ) Parameters $sFilePath Path and filename of the file to be created. damn your right it was in the udf help file forgot about that one Thx man #include <File.au3> If Not _FileCreate("error.log") Then MsgBox(4096,"Error", " Error Creating/Resetting log. error:" & @error) EndIf Link to comment Share on other sites More sharing options...
enaiman Posted August 2, 2007 Share Posted August 2, 2007 Also ... Right from the help file under FileOpen command - Remarks: When opening a file in write mode, the file will be created if it does not exist. So FileOpen ("C:\test.txt", 2) will create that file - this way you can avoid including a whole UDF (File.au3 has around 600+ lines of code) into your script just for such a simple operation. SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script wannabe "Unbeatable" Tic-Tac-Toe Paper-Scissor-Rock ... try to beat it anyway :) 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