Returns the short version of the file path (this is the path with any folder and file names truncated as above). Employees.html is truncated to Employ~1.htm Returns the short version of a filename (using the 8.3 convention).Į.g. This property gets the Folder object for the parent relating to the specified file. Lets us get or change the name of the specified file. Returns the drive letter of the drive where the file is located. This property returns the date and time that the file was last modified. Gets the date and time that the file was last accessed. This property gets the date and time that the file was created. This property allows us to get or change the various attributes of a file. The following is a list of properties available for File objects : Output attributes to text file separating with a comma.Set OutputFile = fso.CreateTextFile("ScriptOutput.csv", True) When loaded into a spreadsheet this would give you 1 file per line with each property in a separate column. In this modified version selected properties are comma separated. You can exclude a property from the output file by removing the appropriate line above or commenting it out by placing a single quote character at the beginning of the line. Make sure you replace “mySubDirectory” with the name of the folder you wish to list files from. ![]() OutputFile.WriteLine(item.DateLastModified) OutputFile.WriteLine(item.DateLastAccessed) ![]() Set OutputFile = fso.CreateTextFile("ScriptOutput.txt", True) ' Define folder we want to list files from Set fso = CreateObject("Scripting.FileSystemObject")
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |