FileConstants.au3 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. #include-once
  2. ; #INDEX# =======================================================================================================================
  3. ; Title .........: File_Constants
  4. ; AutoIt Version : 3.3.14.5
  5. ; Language ......: English
  6. ; Description ...: Constants to be included in an AutoIt v3 script when using File functions.
  7. ; Author(s) .....: Valik, Gary Frost, ...
  8. ; ===============================================================================================================================
  9. ; #CONSTANTS# ===================================================================================================================
  10. ; Indicates file copy and install options
  11. Global Const $FC_NOOVERWRITE = 0 ; Do not overwrite existing files (default)
  12. Global Const $FC_OVERWRITE = 1 ; Overwrite existing files
  13. Global Const $FC_CREATEPATH = 8 ; Create destination directory structure if it doesn't exist
  14. ; Indicates file date and time options
  15. Global Const $FT_MODIFIED = 0 ; Date and time file was last modified (default)
  16. Global Const $FT_CREATED = 1 ; Date and time file was created
  17. Global Const $FT_ACCESSED = 2 ; Date and time file was last accessed
  18. ; FileGetTime Constants
  19. Global Const $FT_ARRAY = 0
  20. Global Const $FT_STRING = 1
  21. ; FileSelectFolder Constants
  22. Global Const $FSF_CREATEBUTTON = 1
  23. Global Const $FSF_NEWDIALOG = 2
  24. Global Const $FSF_EDITCONTROL = 4
  25. ; FileSetTime, FileSetAttrib
  26. Global Const $FT_NONRECURSIVE = 0
  27. Global Const $FT_RECURSIVE = 1
  28. ; Indicates the mode to open a file
  29. Global Const $FO_READ = 0 ; Read mode
  30. Global Const $FO_APPEND = 1 ; Write mode (append)
  31. Global Const $FO_OVERWRITE = 2 ; Write mode (erase previous contents)
  32. Global Const $FO_CREATEPATH = 8 ; Create directory structure if it doesn't exist
  33. Global Const $FO_BINARY = 16 ; Read/Write mode binary
  34. Global Const $FO_UNICODE = 32 ; Write mode Unicode UTF16-LE
  35. Global Const $FO_UTF16_LE = 32 ; Write mode Unicode UTF16-LE
  36. Global Const $FO_UTF16_BE = 64 ; Write mode Unicode UTF16-BE
  37. Global Const $FO_UTF8 = 128 ; Read/Write mode UTF8 with BOM
  38. Global Const $FO_UTF8_NOBOM = 256 ; Read/Write mode UTF8 with no BOM
  39. Global Const $FO_ANSI = 512 ; Read/Write mode ANSI
  40. Global Const $FO_UTF16_LE_NOBOM = 1024 ; Write mode Unicode UTF16-LE with no BOM
  41. Global Const $FO_UTF16_BE_NOBOM = 2048 ; Write mode Unicode UTF16-BE with no BOM
  42. Global Const $FO_UTF8_FULL = 16384 ; Use full file UTF8 detection if no BOM present
  43. Global Const $FO_FULLFILE_DETECT = 16384 ; Use full file UTF8 detection if no BOM present
  44. ; Indicates file read options
  45. Global Const $EOF = -1 ; End-of-file reached
  46. ; Indicates file open and save dialog options
  47. Global Const $FD_FILEMUSTEXIST = 1 ; File must exist
  48. Global Const $FD_PATHMUSTEXIST = 2 ; Path must exist
  49. Global Const $FD_MULTISELECT = 4 ; Allow multi-select
  50. Global Const $FD_PROMPTCREATENEW = 8 ; Prompt to create new file
  51. Global Const $FD_PROMPTOVERWRITE = 16 ; Prompt to overWrite file
  52. Global Const $CREATE_NEW = 1
  53. Global Const $CREATE_ALWAYS = 2
  54. Global Const $OPEN_EXISTING = 3
  55. Global Const $OPEN_ALWAYS = 4
  56. Global Const $TRUNCATE_EXISTING = 5
  57. Global Const $INVALID_SET_FILE_POINTER = -1
  58. ; Indicates starting point for the file pointer move operations
  59. Global Const $FILE_BEGIN = 0
  60. Global Const $FILE_CURRENT = 1
  61. Global Const $FILE_END = 2
  62. Global Const $FILE_ATTRIBUTE_READONLY = 0x00000001
  63. Global Const $FILE_ATTRIBUTE_HIDDEN = 0x00000002
  64. Global Const $FILE_ATTRIBUTE_SYSTEM = 0x00000004
  65. Global Const $FILE_ATTRIBUTE_DIRECTORY = 0x00000010
  66. Global Const $FILE_ATTRIBUTE_ARCHIVE = 0x00000020
  67. Global Const $FILE_ATTRIBUTE_DEVICE = 0x00000040
  68. Global Const $FILE_ATTRIBUTE_NORMAL = 0x00000080
  69. Global Const $FILE_ATTRIBUTE_TEMPORARY = 0x00000100
  70. Global Const $FILE_ATTRIBUTE_SPARSE_FILE = 0x00000200
  71. Global Const $FILE_ATTRIBUTE_REPARSE_POINT = 0x00000400
  72. Global Const $FILE_ATTRIBUTE_COMPRESSED = 0x00000800
  73. Global Const $FILE_ATTRIBUTE_OFFLINE = 0x00001000
  74. Global Const $FILE_ATTRIBUTE_NOT_CONTENT_INDEXED = 0x00002000
  75. Global Const $FILE_ATTRIBUTE_ENCRYPTED = 0x00004000
  76. Global Const $FILE_SHARE_READ = 0x00000001
  77. Global Const $FILE_SHARE_WRITE = 0x00000002
  78. Global Const $FILE_SHARE_DELETE = 0x00000004
  79. Global Const $FILE_SHARE_READWRITE = BitOR($FILE_SHARE_READ, $FILE_SHARE_WRITE)
  80. Global Const $FILE_SHARE_ANY = BitOR($FILE_SHARE_READ, $FILE_SHARE_WRITE, $FILE_SHARE_DELETE)
  81. Global Const $GENERIC_ALL = 0x10000000
  82. Global Const $GENERIC_EXECUTE = 0x20000000
  83. Global Const $GENERIC_WRITE = 0x40000000
  84. Global Const $GENERIC_READ = 0x80000000
  85. Global Const $GENERIC_READWRITE = BitOR($GENERIC_READ, $GENERIC_WRITE)
  86. ; FileGetEncoding Constants
  87. Global Const $FILE_ENCODING_UTF16LE = 32
  88. Global Const $FE_ENTIRE_UTF8 = 1
  89. Global Const $FE_PARTIALFIRST_UTF8 = 2
  90. ; FileGetLongName and FileGetShortName
  91. Global Const $FN_FULLPATH = 0
  92. Global Const $FN_RELATIVEPATH = 1
  93. ; FileGetVersion Constants _WinAPI_VerQueryValue, _WinAPI_VerQueryValueEx
  94. Global Const $FV_COMMENTS = "Comments"
  95. Global Const $FV_COMPANYNAME = "CompanyName"
  96. Global Const $FV_FILEDESCRIPTION = "FileDescription"
  97. Global Const $FV_FILEVERSION = "FileVersion"
  98. Global Const $FV_INTERNALNAME = "InternalName"
  99. Global Const $FV_LEGALCOPYRIGHT = "LegalCopyright"
  100. Global Const $FV_LEGALTRADEMARKS = "LegalTrademarks"
  101. Global Const $FV_ORIGINALFILENAME = "OriginalFilename"
  102. Global Const $FV_PRODUCTNAME = "ProductName"
  103. Global Const $FV_PRODUCTVERSION = "ProductVersion"
  104. Global Const $FV_PRIVATEBUILD = "PrivateBuild"
  105. Global Const $FV_SPECIALBUILD = "SpecialBuild"
  106. ; Indicates _FileReadToArray modes
  107. Global Const $FRTA_NOCOUNT = 0
  108. Global Const $FRTA_COUNT = 1
  109. Global Const $FRTA_INTARRAYS = 2
  110. Global Const $FRTA_ENTIRESPLIT = 4
  111. ; Indicates _FileListToArray modes
  112. Global Const $FLTA_FILESFOLDERS = 0
  113. Global Const $FLTA_FILES = 1
  114. Global Const $FLTA_FOLDERS = 2
  115. ; Indicates _FileListToArrayRec modes
  116. Global Const $FLTAR_FILESFOLDERS = 0
  117. Global Const $FLTAR_FILES = 1
  118. Global Const $FLTAR_FOLDERS = 2
  119. Global Const $FLTAR_NOHIDDEN = 4
  120. Global Const $FLTAR_NOSYSTEM = 8
  121. Global Const $FLTAR_NOLINK = 16
  122. Global Const $FLTAR_NORECUR = 0
  123. Global Const $FLTAR_RECUR = 1
  124. Global Const $FLTAR_NOSORT = 0
  125. Global Const $FLTAR_SORT = 1
  126. Global Const $FLTAR_FASTSORT = 2
  127. Global Const $FLTAR_NOPATH = 0
  128. Global Const $FLTAR_RELPATH = 1
  129. Global Const $FLTAR_FULLPATH = 2
  130. ; _PathSplit Constants
  131. Global Const $PATH_ORIGINAL = 0
  132. Global Const $PATH_DRIVE = 1
  133. Global Const $PATH_DIRECTORY = 2
  134. Global Const $PATH_FILENAME = 3
  135. Global Const $PATH_EXTENSION = 4
  136. ; ===============================================================================================================================