File, Directory and Disk functions Reference

Below is a complete list of the functions available in AutoIt. Click on a function name for a detailed description.

 

Function Description
ConsoleRead Read from the STDIN stream of the AutoIt script process.
ConsoleWrite Writes data to the STDOUT stream. Some text editors can read this stream as can other programs which may be expecting data on this stream.
ConsoleWriteError Writes data to the STDERR stream. Some text editors can read this stream as can other programs which may be expecting data on this stream.
DirCopy Copies a directory and all sub-directories and files (Similar to xcopy).
DirCreate Creates a directory/folder.
DirGetSize Returns the size in bytes of a given directory.
DirMove Moves a directory and all sub-directories and files.
DirRemove Deletes a directory/folder.
DriveGetDrive Returns an array containing the enumerated drives.
DriveGetFileSystem Returns File System Type of a drive.
DriveGetLabel Returns Volume Label of a drive, if it has one.
DriveGetSerial Returns Serial Number of a drive.
DriveGetType Returns drive type.
DriveMapAdd Maps a network drive.
DriveMapDel Disconnects a network drive.
DriveMapGet Retrieves the details of a mapped drive.
DriveSetLabel Sets the Volume Label of a drive.
DriveSpaceFree Returns the free disk space of a path in Megabytes.
DriveSpaceTotal Returns the total disk space of a path in Megabytes.
DriveStatus Returns the status of the drive as a string.
FileChangeDir Changes the current working directory.
FileClose Closes a previously opened file.
FileCopy Copies one or more files.
FileCreateNTFSLink Creates an NTFS hardlink to a file or a directory.
FileCreateShortcut Creates a shortcut (.lnk) to a file.
FileDelete Delete one or more files.
FileExists Checks if a file or directory exists.
FileFindFirstFile Creates a search handle, defined by a path and file mask.
FileFindNextFile Returns the next filename defined by the search handle.
FileFlush Flushes the file's buffer to disk.
FileGetAttrib Returns a code string representing a file's attributes.
FileGetEncoding Determines the text encoding used in a file.
FileGetLongName Returns the long path+name of the path+name passed.
FileGetPos Retrieves the current file position.
FileGetShortcut Retrieves details about a shortcut.
FileGetShortName Returns the 8.3 short path+name of the path+name passed.
FileGetSize Returns the size of a file in bytes.
FileGetTime Returns the time and date information for a file.
FileGetVersion Returns version information stored in a file.
FileInstall Include and install a file with the compiled script.
FileMove Moves one or more files.
FileOpen Opens a file for reading or writing.
FileOpenDialog Initiates a Open File Dialog.
FileRead Read in a number of characters from a previously opened file.
FileReadLine Read in a line of text from a previously opened text file.
FileReadToArray Reads the specified file into an array.
FileRecycle Sends a file or directory to the recycle bin.
FileRecycleEmpty Empties the recycle bin.
FileSaveDialog Initiates a Save File Dialog.
FileSelectFolder Initiates a Browse For Folder dialog.
FileSetAttrib Sets the attributes of one or more files/directories.
FileSetEnd Sets the end of the file at the current file position.
FileSetPos Sets the current file position.
FileSetTime Sets the timestamp of one of more files.
FileWrite Write text/data to the end of a previously opened file.
FileWriteLine Append a line of text to the end of a previously opened text file.
IniDelete Deletes a value from a standard format .ini file.
IniRead Reads a value from a standard format .ini file.
IniReadSection Reads all key/value pairs from a section in a standard format .ini file.
IniReadSectionNames Reads all sections in a standard format .ini file.
IniRenameSection Renames a section in a standard format .ini file.
IniWrite Writes a value to a standard format .ini file.
IniWriteSection Writes a section to a standard format .ini file.