How do I cycle through folders?

greaseman

Closer to seniority!
Local time
Today, 15:49
Joined
Jan 6, 2003
Messages
360
I've got a bunch of Excel files in multiple folders that I want to programatically convert to txt files. The folders are nested several layers deep, ie,

\\LevelA\LevelB\LevelC\LevelD\LevelE\LevelF\uniquenameA
\\LevelA\LevelB\LevelC\LevelD\LevelE\LevelF\uniquenameB
\\LevelA\LevelB\LevelC\LevelD\LevelE\LevelF\uniquenameC
\\LevelA\LevelB\LevelC\LevelD\LevelE\LevelF\uniquenameD

Within each ...uniquenameA...uniqueNameB.... folder reside multiple Excel files. These are the files I want to convert to txt files.

How might I go about something like this, using VBA?

If anyone is willing to offer suggestions or help, I would be most grateful. Thank you so much!
 
You can use the FileSystemObject to cycle through the folders and retrieve the file names and then open the files in excel and save them as txt files.
 
KeithG,

Thanks for your reply! Could you please provide more detail? I'm just not familiar with the FileSystemObject or how to use it.
 

Users who are viewing this thread

Back
Top Bottom