Question

Locked

batch file to list user directory minus sytem folders and files

By jogden ·
I am attempting to create a batch file which will display all 'user created' files and folders in the users profile folder under Documents and Settings in XP Pro. The use of dir /s seems to overburden me with all the files and folders in their folder.

The critical thing I would like to achieve with this is to tell quickly whether a user has indeed made use of their profile folder for storage of their work. Our users all have mapped drives for their documents stored eslewhere on a server. Their 'My Documents' folder has been remapped to this network folder, however a lot of our power users in particular write to their profile folders. When we need to re-image a machine, this becomes a problem for us we cannot readily tell whether or not they have done so.

Any ideas?

I have written a batch file using this line to determine the structure of their profile folder;
dir "C:\Documents and Settings\%username%" /s>C:\list_of_folders_on_UserProf.txt

This has proven to be too impractical as it shows all the temp files and app data etc etc. I really only want to display the users personal files.

I would be most appreciative if anyones has a little .bat file or a few clues as to how I might be able to avoid listing the sytem folder and their subs/files.

My current batch file is as follows;

rem This utility is designed to provide you with a set of lists which will
rem assist you in determining the installed programs and documents for a specific user
rem Where list_of_program_files.txt shows the C:\Program Files directory
rem Where list_of_folders_on_CDrive.txt will assist you in determining if any apps have been installed directly to the C Drive
rem list_of_folders_on_UserProf.txt will assist you in determining whether the user has saved files to their local profile
rem Once run, you will find the above three text files stored on the C Drive directly
rem This utility will NOT work on Vista as Vista does not allow apps to write directly to the C Drive
@echo off
dir "C:\Program Files">C:\list_of_program_files.txt
dir C>C:\list_of_folders_on_CDrive.txt
dir "C:\Documents and Settings\%username%" /s>C:\list_of_folders_on_UserProf.txt

This conversation is currently closed to new comments.

2 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Share your knowledge
Back to Networks Forum
2 total posts (Page 1 of 1)  

Related Discussions

Related Forums