Hello,
It's been awhile, and I'm rusty. Here's what I need to do (Microsoft XP running MS Office 2003):
Somehow I need to enumerate any and all files (including subdirectories) into a table. I have a table with the following fields:
FileNameAndDirectory
FileSize
Both are set to maximum Text(255).
What I need to do (somehow) is to utilize the FileSystemObject to enumerate any and all files in a directory, to include subdirectories. So my table would be populated like this:
H:\File1.exe 131kb
H:\Directory1\File2.exe 145kb
H:\Directory1\Directory2\File1.exe 131kb
H:\Directory1\Directory2\Directory3\File3.jpg 500kb
H:\Directory1\Directory2\Directory3\File4.jpb 650kb
The goal of all this, after I can enumerate every file in a specified path (in this case, a drive letter) is to identify duplicate filenames and sizes in a given directory and all of it's subdierctories (there are hundreds of subdirectories in this case). I can easily parse out the file names and query the table afterwards, but have no idea how to 1) list every file in every subdirectory in a given path to populate my table and 2) obtain each file's size.
The user has several thousand images and files which are duplicates in subdirectories (he backed everything up the easy way -- copy a folder with it's subfolders and paste to a drive). In this case, he would need to know that File1.exe is duplicated in directories "H:\" and "H:\Directory1\Directory2\".
I really just need a way to populate a field in a table with every filename and directory on a given drive.
My memory of the FileSystemObject is eluding me, can anyone give me any references?
Thanks for any and all help!!!
Best Regards,
Jason
It's been awhile, and I'm rusty. Here's what I need to do (Microsoft XP running MS Office 2003):
Somehow I need to enumerate any and all files (including subdirectories) into a table. I have a table with the following fields:
FileNameAndDirectory
FileSize
Both are set to maximum Text(255).
What I need to do (somehow) is to utilize the FileSystemObject to enumerate any and all files in a directory, to include subdirectories. So my table would be populated like this:
H:\File1.exe 131kb
H:\Directory1\File2.exe 145kb
H:\Directory1\Directory2\File1.exe 131kb
H:\Directory1\Directory2\Directory3\File3.jpg 500kb
H:\Directory1\Directory2\Directory3\File4.jpb 650kb
The goal of all this, after I can enumerate every file in a specified path (in this case, a drive letter) is to identify duplicate filenames and sizes in a given directory and all of it's subdierctories (there are hundreds of subdirectories in this case). I can easily parse out the file names and query the table afterwards, but have no idea how to 1) list every file in every subdirectory in a given path to populate my table and 2) obtain each file's size.
The user has several thousand images and files which are duplicates in subdirectories (he backed everything up the easy way -- copy a folder with it's subfolders and paste to a drive). In this case, he would need to know that File1.exe is duplicated in directories "H:\" and "H:\Directory1\Directory2\".
I really just need a way to populate a field in a table with every filename and directory on a given drive.
My memory of the FileSystemObject is eluding me, can anyone give me any references?
Thanks for any and all help!!!
Best Regards,
Jason