DesktopClean 2.5

We have found that many of our desktop users (despite our warnings) continue to place files/folder on their desktop instead of shortcuts *to* those files/folders. We explain that files stored on their local computer are not backed up…and anything that is important should be saved to the network (which is backed up nightly). Additionally, for people that have roaming profiles, “carrying around” their desktop files makes for large profiles and thus slowing down their login/logout times.

To help remedy this situation, I wrote this utility, DesktopClean.exe, that will scan the local desktop folders (the user’s profile and the All Users profile), and *MOVE* any non-shortcut files ( *.lnk, *.nal, *.pif, *.txt ) to a specified network path, then create shortcuts to those moved files onto their desktop.

Clean user’s desktop of non-shortcut items. Specify the path (Network_Path) to where items should be moved, for example:

DesktopClean "H:\Moved from Desktop"

NOTIFY – If files were found to move, display notification message box

QUIET – Do not display file move progress window

VERYQUIET – Do not display ANY dialogs

NOINFO – Do not create an INFO desktop shortcut after cleaning

To display a custom message for the information shortcut that is created if items are found to be moved, simply create a .TXT file of the same name and in the same directory as the executable, EG:

DesktopClean.TXT.

Use the variable, %NetDir%, within the text file and it will be replaced with the directory name where the files were moved to.

10-4-05 Update: I had a Czech request a modification to DesktopClean in order to accommodate the different language name for “Desktop”…which is “Plocha” by the way. So, this update refers to the registry for the name of the desktop folder instead of it being hard-coded.

10-6-05 Update: URLs are now excluded from being moved.

12-15-05 Update:
– Verifies destination has enough room for the move. If not, it will throw up a Warning message (for each file/directory it couldn’t move) that will time out after 5 seconds if no response. To suppress these messages, you can use the QUIET parameter. Also, there is a VERYQUIET parameter that will suppress all message windows.
– Has a file copy progress meter for large file/directory moves.
– When moving same-named directories or files, the destination directory and/or file, will be “generationally renamed” before the desktop copies are moved, resulting in something like this:

This way, the same shortcut created on the desktop will still correctly point to the most recent file/directory that was moved. Previous “versions” of the moved file/directory are generationally renamed, *.–1, *.–2, *.–3, etc. with *.–1 being the most recent, *.–3 being the oldest.

Disclaimer: This content is not supported by Novell. It was contributed by a community member and is published "as is." It seems to have worked for at least one person, and might work for you. But please be sure to test it thoroughly before using it in a production environment.