Macros Excel to list and organize files mp3, pdf, xls ....
In many occasions we want to organize all the files of our computer, we have our spreadsheets, photographs, files of music. in different folders, sometimes we do not know if that files contains a CD that we recordered long time ago. But, with macros VBA we can find them quickly, therefore we could organize and obtain a list with the names of files, the sizes that it occupies, the folder where it is contained, the date of creation..
Excel Macro VBA- organize and list the files
In order to execute the macro that list of the files we should introduce two input data:
Input datas :
Type of file : we write the extension of the type of file that we want to seek and to list always with *. in front of the extension.
To list all the files excel: *. xls.
To list all the files of music: *.mp3, *.wma
To list files pdf: *.pdf
Location : We write the route where we want to look for and to list the files by the following ways: [UNIT]: \ [PRINCIPAL FOLDER] / [SUBFOLDER 1]/
Example: we want to list all the files of an older that one finds in the unit C whose name is "my files".
We want to list all the files of our hand disk:
Listed report of files:
When pressing the bottom "List files", the macro vba is executed, it look for all the files offering the following information.
Complete route : Writes the name of the complete route where it is the file and the name of the file.
Name : Writes the name of the file without including the route where it is.
Number : It numbers the files correlatively as they have arranged on the hard disk .
Data creation : Date when it was created.
Data Access : Indicates the last time it was opened.
Data modified : Indicates the last modification.
KB : Indicates the size of the file in Kbytes.
Once the macro vba is executed, an alert will appear to report us the total files and the total size of all the files occupied.
In case the files would not be found, another alert will appear.
webandmacros.net 2007 - 2015