TheJocker1236
New Member
- Joined
- Dec 15, 2016
- Messages
- 3
Hi,
I found this code in the Internet.
I want to extract the the names, the saved location path and the size of a files.
Can someone help me?
the cord must be able extract all file types and the the files in the sub directories.
Code
<tbody>
</tbody>\Code
I found this code in the Internet.
I want to extract the the names, the saved location path and the size of a files.
Can someone help me?
the cord must be able extract all file types and the the files in the sub directories.
Code
Sub Test() Dim xRow As Long Dim xDirect$, xFname$, InitialFoldr$ InitialFoldr$ = "C:\Desktop" '<<< Startup folder to begin searching from With Application.FileDialog(msoFileDialogFolderPicker) .InitialFileName = Application.DefaultFilePath & "" .Title = "Please select a folder to list Files from" .InitialFileName = InitialFoldr$ .Show If .SelectedItems.Count <> 0 Then xDirect$ = .SelectedItems(1) & "" xFname$ = Dir(xDirect$, 7) Do While xFname$ <> "" ActiveCell.Offset(xRow) = Left(xFname$, InStrRev(xFname$, ".") - 1) xRow = xRow + 1 xFname$ = Dir Loop End If End With End Sub |
<tbody>
</tbody>