Is it possible to list both files and folders in a directory?
Using the "FileSystemObject" method.
Is it possible to list both files and folders in a directory?
Using the "FileSystemObject" method.
Something like this perhaps...
![]()
Please Login or Register to view this content.
Good Luck...
I don't presume to know what I am doing, however, just like you, I too started somewhere...
One-day, One-problem at a time!!!
If you feel I have helped, please click on the [★ Add Reputation] to left of post window...
Also....Add a comment if you like!!!!
And remember...Mark Thread as Solved...
Excel Forum Rocks!!!
@sintek, your code gives only folder or file. I needed both.
For example, list in snapshot should be:
New folder1
New folder2
New Microsoft Excel Worksheet1
New Microsoft Word Document1
Capture.JPG
So...You do not want the files within the subfolders of the folders...
You just want first level Folders and files...
Yes I do want subfolders but that will come later.
The hard part seems to be listing folders together with files.
Perhaps I just don't understand...
If for example on your desktop you have 2 Folders and two documents...
Must code show those 4 only....Not go in further
Yes, show 2 folders and 2 documents.
Yes, go to subfolders where they exist.
Harder than I thought.
![]()
Please Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks