Microsoft
Software
Hardware
Network
Question : Excel VBA Select All File Types From a Specified Folder
Hey all,
So far, I have a program that selects all files from a specified folder (See attached). I can easily store all of these files into an array obviously. However, I would like to grab all of those files and somehow group similarly named ones together, or somehow distinguish how many types of files I have (Not by the extension, but by the name itself).
For example:
excel_daily_ext_0502.txt
excel_daily_ext_0503.txt
excel_daily_ext_0504.txt
return_time_stl_handle.050
2.txt
return_time_phl_handle.050
2.txt
return_time_min_handle.050
2.txt
return_time_stl_handle.050
3.txt
return_time_phl_handle.050
3.txt
return_time_min_handle.050
3.txt
return_time_stl_handle.050
4.txt
return_time_phl_handle.050
4.txt
return_time_min_handle.050
4.txt
happy_days_stl_0502.txt
happy_days_stl_0503.txt
happy_days_stl_0504.txt
would return 3 different types of files. The stl, phl, min do not matter. These file types would obviously be:
excel_daily_ext, return_time (or return_time_handle), and happy_days.
Lastly, most of my files are .txt extensions, but some are not. You can set a filter in the code that I have. I would prefer that these files be stored in an array, but also somehow grouped by file type? I just don't know of a good way to do this right now.. Any help would be greatly appreciated!
Thanks!
Rob
Attachments:
findFileTypes.xlsm
(27 KB)
(File Type Details)
Please enter a brief description.
Answer : Excel VBA Select All File Types From a Specified Folder
Those files are just cab files with a different extension... so rename to cab.
You can't really do changes.
stp is a list/web template file... contains xml + other files.
wsp is a solution file contains >1 xml + dll + other files.
Random Solutions
Need to force exchange users to send internal email externally
How do I remove Office XP and 2003 using Msizap.exe from a command line?
Look Up in Query
cisco ios back up
Access Property box Garbled
Certain websites time out on connecting
Iseries OSV5R4 PM eserver iSeries telephone number
Windows 2008 R2 Admin Shares
Where do I control calendar Sync Settings on BPS?
fully uninstall Acrobat 8.2.2