ListFoldersAndFiles |
Post Reply |
Author | |
A.D. Tejpal
Microsoft MVP Joined: 30 Jun 2008 Status: Offline Points: 192 |
Post Options
Thanks(0)
Posted: 14 Aug 2011 at 11:57pm |
ListFoldersAndFiles This sample db demonstrates listing of folders and files contained within the selected top directory, as per desired file specifications. Based upon user's choice, subfolders can be included or ignored. If desired, more than one types of files can be included in a single file spec in the form of a comma separated string - e.g. : "*.htm,*.pdf,*.txt" etc.
Process Mode For Listing Folders and files: (a) Non-Recursive mode - using Dir() function. Apart from being faster than (b), it has the advantage that there is no extra strain on memory resources (otherwise associated with recursive approach), thus avoiding the risk of potential hang up in case of very large and deep directory tree. (b) Recursive mode - using FileSystemObject Display Of Listed Folders And Files: Subfolders and their files are displayed in adjacent subforms. For the current file, its details (like file type, size, attributes, DtCreated / DtLastModified / DtLastAccessed) are also displayed, apart from a hyperlink to the file itself. The hyperlink label becomes active only for permitted file types. The user can edit the contents of table T_AllowHyperLink for setting such permissions. Three alternative styles of display are provided as follows: Style A - View Folders and Files In Hierarchical Chain: Style B - View All Folders At A Glance - And Their Files: Style C - View All Files At A Glance: General module named basCommDlg, an adaptation from Access Developer's Handbook, has been kindly provided by Bill Mosca. Note: Version: Access 2000 file format. References: (a) DAO 3.6 , (b) Microsoft Scripting Runtime
Download File >>: uploads/37/ListFoldersAndFiles.zip
|
|
Sponsored Links | Want a good read? Try The Summer of His Life (available on Amazon!) |
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |