Please can anybody assist with listing File Attributes from a folder I need to list.
The following code is super quick at listing filenames but I need to show other file details.
Here is the code I am trying to use and am stuck trying to list the file Mb, Date, Length Attributes etc.
Many thanks.![]()
Sub Attributes() With Application .ScreenUpdating = False .EnableEvents = False End With Application.Calculation = xlCalculationManual With Workbooks("File Attributes.xls").Worksheets("Sheet3").Range("A3:Z65536") .ClearContents .FormatConditions.Delete End With Dim Cfolder As String Dim wb As Workbook, ws As Worksheet Set wb = ActiveWorkbook Set ws = Worksheets("Sheet3") 'ActiveSheet Cfolder = Worksheets("Sheet3").Range("G1").Value 'Path Dim myCFile, mySFile, myDirectory myCFile = Dir(Cfolder & "*.*") Do While myCFile <> "" With myCFile ws.Range("A" & ws.Rows.Count).End(xlUp).Offset(1, 0) = myCFile 'Attribute 0 - Filename ws.Range("B" & ws.Rows.Count).End(xlUp).Offset(1, 0) = "?" 'Attribute 1 - Mb ws.Range("C" & ws.Rows.Count).End(xlUp).Offset(1, 0) = "?" 'Attribute 3 - Date ws.Range("D" & ws.Rows.Count).End(xlUp).Offset(1, 0) = "?" 'Attribute 27 - Length myCFile = myDirectory & myCFile End With myCFile = Dir() Loop Application.Calculation = xlCalculationAutomatic With Application .EnableEvents = True .ScreenUpdating = True End With End Sub











LinkBack URL
About LinkBacks
Register To Reply

Bookmarks