imported_unknown
Active Member
- Joined
- Jan 13, 2002
- Messages
- 424
Hi guys,
This is may first post and hope to get ideas, as well as give ideas, so that we can all benefit from them.
- - - -
I work at a multinational company and we often have to deal with many folders, sub-folders, hard drives, network drives, removable drives, USB drives, CDs, etc. Sometimes it's a complete mess and waste of space and time searching for files (not to mention redundant and duplicate files).
Since Microsoft has never provided us with a "Print folder contents" or "List folder" commands on Windows Explorer, I've performed some research on the "File System Object", which can be accessed by VBA, VB, VBScript, etc. I found many interesting possibilities.
Since then, I'm creating a "List folder contents" macro in Excel. Why Excel? Because of its endless possibilities of formatting, reporting, etc. This macro will list all subfolders and files from any given drive or folder, along with their common properties: size, dates, attributes, etc. and generate a neat listing on a worksheet, which can then be printed or just saved.
Now, I'm posting two questions:
(1) - FILE ICONS
After searching a few sites and references I also found a way to "extract" the icon from a file. However, the solutions using API calls were for VB projects, rather than VBA. I've tried some code adaptations, but coudn't come up with a solution to this due to the lack of examples or further explanations.
The mission: from a file object, get the small icon (or large icon) and paste it on a worksheet cell to make the report more "Windows-like".
As a reference to you: http://www.allapi.net/apilist/FFF4B6DE1075139CC7AFCCA45CDF2A2C.html
(2) FILE OWNERSHIP
On our network it's very common for the users to keep all files on the network drives because of the daily backups. Since each user has a restricted space in megabytes, the need for extra space is very common.
As a general guideline our Help Desk staff suggests that older or unused files should be removed or transferred to removable media in order to free up some space. Since many users share a department's directory, it's hard to know who did what.
We have a Novell Netware 4.12 with WinNT(SP6), Win98 and WinXP workstations. We're planning to upgrade Netware and Windows (2000 or XP-Pro) next year.
One of the main reasons of this folder listing macro is to identify particular user's files through Novell's OWNER attribute, but I coudn't figure out how to obtain this information from a file. Perhaps there's a Novell API call I could use, or even another way to get the "ownership" of each file and folder, such as system variables...
- - -
Well, I hope to have some ideas on these issues.
For now: thanx.
This is may first post and hope to get ideas, as well as give ideas, so that we can all benefit from them.
- - - -
I work at a multinational company and we often have to deal with many folders, sub-folders, hard drives, network drives, removable drives, USB drives, CDs, etc. Sometimes it's a complete mess and waste of space and time searching for files (not to mention redundant and duplicate files).
Since Microsoft has never provided us with a "Print folder contents" or "List folder" commands on Windows Explorer, I've performed some research on the "File System Object", which can be accessed by VBA, VB, VBScript, etc. I found many interesting possibilities.
Since then, I'm creating a "List folder contents" macro in Excel. Why Excel? Because of its endless possibilities of formatting, reporting, etc. This macro will list all subfolders and files from any given drive or folder, along with their common properties: size, dates, attributes, etc. and generate a neat listing on a worksheet, which can then be printed or just saved.
Now, I'm posting two questions:
(1) - FILE ICONS
After searching a few sites and references I also found a way to "extract" the icon from a file. However, the solutions using API calls were for VB projects, rather than VBA. I've tried some code adaptations, but coudn't come up with a solution to this due to the lack of examples or further explanations.
The mission: from a file object, get the small icon (or large icon) and paste it on a worksheet cell to make the report more "Windows-like".
As a reference to you: http://www.allapi.net/apilist/FFF4B6DE1075139CC7AFCCA45CDF2A2C.html
(2) FILE OWNERSHIP
On our network it's very common for the users to keep all files on the network drives because of the daily backups. Since each user has a restricted space in megabytes, the need for extra space is very common.
As a general guideline our Help Desk staff suggests that older or unused files should be removed or transferred to removable media in order to free up some space. Since many users share a department's directory, it's hard to know who did what.
We have a Novell Netware 4.12 with WinNT(SP6), Win98 and WinXP workstations. We're planning to upgrade Netware and Windows (2000 or XP-Pro) next year.
One of the main reasons of this folder listing macro is to identify particular user's files through Novell's OWNER attribute, but I coudn't figure out how to obtain this information from a file. Perhaps there's a Novell API call I could use, or even another way to get the "ownership" of each file and folder, such as system variables...
- - -
Well, I hope to have some ideas on these issues.
For now: thanx.