Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Quick Tip: Organize a Sloppy Desktop in Seconds with D-Sweeper 1.0


04 Sep 2010   #1

 
Quick Tip: Organize a Sloppy Desktop in Seconds with D-Sweeper 1.0

Does your desktop look like this?



Mine often does. And after a while, trying to find files becomes a long, drawn out, unpleasent experience. To deal with all this clutter, I wrote a script that will clean up a sloppy desktop in only a few seconds, by organizing all of the files into neat, categorized folders.

Usage:

To use this script, you need to do the following things:
  • Copy the following code into a text file and name it D-Sweeper.bat . .bat is the default file format for batch files on Windows, and is necessary to make the script run.

Code:
 @echo on
cd "%USERPROFILE%\Desktop"

::Check to see if the directories already exist
:DOCUMENTSFOLDER
If exist "%USERPROFILE%\Desktop\D-Sweeper\Documents" Goto AUDIOFOLDER
mkdir "%USERPROFILE%\Desktop\D-Sweeper\Documents"
:AUDIOFOLDER
If exist "%USERPROFILE%\Desktop\D-Sweeper\Audio" Goto VIDEOFOLDER
mkdir "%USERPROFILE%\Desktop\D-Sweeper\Audio"
:VIDEOFOLDER
If exist "%USERPROFILE%\Desktop\D-Sweeper\Video" Goto PROGRAMSFOLDER
mkdir "%USERPROFILE%\Desktop\D-Sweeper\Video"
:PROGRAMSFOLDER
If exist "%USERPROFILE%\Desktop\D-Sweeper\Programs" Goto PICTURESFOLDER
mkdir "%USERPROFILE%\Desktop\D-Sweeper\Programs"
:PICTURESFOLDER
If exist "%USERPROFILE%\Desktop\D-Sweeper\Pictures" Goto ARCHIVESFOLDER
mkdir "%USERPROFILE%\Desktop\D-Sweeper\Pictures"
:ARCHIVESFOLDER
If exist "%USERPROFILE%\Desktop\D-Sweeper\ARCHIVES" Goto DOCUMENTS
mkdir "%USERPROFILE%\Desktop\D-Sweeper\Archives"


:DOCUMENTS

move /-y "%USERPROFILE%\DESKTOP"\*.doc "%USERPROFILE%\Desktop\D-Sweeper\Documents"
move /-y "%USERPROFILE%\DESKTOP"\*.pdf "%USERPROFILE%\Desktop\D-Sweeper\Documents"
move /-y "%USERPROFILE%\DESKTOP"\*.txt "%USERPROFILE%\Desktop\D-Sweeper\Documents"
move /-y "%USERPROFILE%\DESKTOP"\*.rtf "%USERPROFILE%\Desktop\D-Sweeper\Documents"
move /-y "%USERPROFILE%\DESKTOP"\*.xls "%USERPROFILE%\Desktop\D-Sweeper\Documents"
move /-y "%USERPROFILE%\DESKTOP"\*.ppt "%USERPROFILE%\Desktop\D-Sweeper\Documents"
move /-y "%USERPROFILE%\DESKTOP"\*.docx "%USERPROFILE%\Desktop\D-Sweeper\Documents"

:AUDIO

move /-y "%USERPROFILE%\DESKTOP"\*.wav "%USERPROFILE%\Desktop\D-Sweeper\Audio"
move /-y "%USERPROFILE%\DESKTOP"\*.mp3 "%USERPROFILE%\Desktop\D-Sweeper\Audio"
move /-y "%USERPROFILE%\DESKTOP"\*.aiff "%USERPROFILE%\Desktop\D-Sweeper\Audio"
move /-y "%USERPROFILE%\DESKTOP"\*.aac "%USERPROFILE%\Desktop\D-Sweeper\Audio"

:VIDEO

move /-y "%USERPROFILE%\DESKTOP"\*.avi "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.dvx "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.mov "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.mpg "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.rm "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.swf "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.wmv "%USERPROFILE%\Desktop\D-Sweeper\Video"
move /-y "%USERPROFILE%\DESKTOP"\*.xvid "%USERPROFILE%\Desktop\D-Sweeper\Video"

:PROGRAMS

move /-y "%USERPROFILE%\DESKTOP"\*.exe "%USERPROFILE%\Desktop\D-Sweeper\Programs"
move /-y "%USERPROFILE%\DESKTOP"\*.bat "%USERPROFILE%\Desktop\D-Sweeper\Programs"
move /-y "%USERPROFILE%\DESKTOP"\*.cmd "%USERPROFILE%\Desktop\D-Sweeper\Programs"

:PICTURES

move /-y "%USERPROFILE%\DESKTOP"\*.jpg "%USERPROFILE%\Desktop\D-Sweeper\Pictures"
move /-y "%USERPROFILE%\DESKTOP"\*.bmp "%USERPROFILE%\Desktop\D-Sweeper\Pictures"
move /-y "%USERPROFILE%\DESKTOP"\*.png "%USERPROFILE%\Desktop\D-Sweeper\Pictures"

:ARCHIVES

move /-y "%USERPROFILE%\DESKTOP"\*.zip "%USERPROFILE%\Desktop\D-Sweeper\Archives"
move /-y "%USERPROFILE%\DESKTOP"\*.rar "%USERPROFILE%\Desktop\D-Sweeper\Archives"
move /-y "%USERPROFILE%\DESKTOP"\*.7z "%USERPROFILE%\Desktop\D-Sweeper\Archives"

REM Please take note: Below is a PGP encrypted message. Only the original author can decrypt this message, as only
REM the original author has access to the secret key that is needed to decrypt it. Also, unless this PGP message
REM is included in this file, the hash values of this file (MD5, SHA-1, and Whirlpool) will not match up with 
REM the authentic hash values that are posted along with this desktop clean up script. Therefore, authenticity and original ownsership are guranteed.

REM -----BEGIN PGP MESSAGE-----
REM Version: GnuPG v2.0.14 (MingW32)

REM hQEMAyR0JCQV5M/xAQf9FD2JyGsyzTHefCeqOouEehTLhyWw+CpdxBBkHj3Pyi/c
REM dmQ799qkG4UNiRFTDwRBHygAhHFyJ9o2msUJmxYLqeNiHWnVEBqReUCVcXCN7la5
REM aAwVavKugr3zgtTXQCeobQt5S6vZmEWv9PM5NMb3Mwhw8puRUvc67OWRhZvxrudy
REM T/ENasU6Ruimxs9tuRINJsxJ+mYJYK+QxI0fgyr7F0q9ORvgo4xktFNdaX5iz8pd
REM aHrpF5LRlLvLVXZrgvGpN8l+WmI61TOPpej7Tf9W9ksQlEsOGihNDAVN0bkMEkv5
REM LOw3ySW1ia7tyXjdFFxGkaUepcJFSMrR3XuXjwMxmtLAmQHxKyxFiV7Hbk+e55dh
REM k4/a1Nnr9xUgIXxOAAy9n2plMa50U36KxgqjpsmU54Qu2wWJzRlQdLLEsjANs/50
REM 7UpPUd0nYaPzgak7YLE2jCTc54IBEd70b0v7OguYDNNR6MLKHfRt+kE0oNhm9cLM
REM IgqU6VQxrKro1W2XvElC3ONGPOcSh+BmKENE+AGgutzxwhfwr2mPguqAnyENLFhY
REM 1Q2HJ9uBEOfGlZyI5VcOOFYwR2wIPmvrCh80Kj71K+W+nT4txrAgBu3fg/AhIlo2
REM 4K1/wRl/HukQ5QdMFONNylVIW71NmQz2xt8kbp7mgGcptM64f12maQ4sMRFyWxGu
REM ExdHXzTXtova9RjPcMpAM5c+CDoUE4803ycLW94/lGnKn/3z13SqxCFW0VX9eYoO
REM Rtyi9GSXZIpVCeJrmsYvHzSp7wicnz1aU1/aYC1duskwcUJGrL+sM153gQ==
REM =QZRN
REM -----END PGP MESSAGE-----
  • Double click the D-Sweeper.bat file to start cleaning.
How It Works:

Upon running the D-Sweeper.bat file, the program will create a folder on your desktop called D-Sweeper, and will subsequently create 6 sub directories inside of the D-Sweeper folder--documents, audio, video, programs, pictures, and archives.

Once the folders have been created, D-Sweeper will scan through the files on your desktop, looking for various types of files, such as .doc files, .pdf files, .mp3 files, etc. As it finds each type of file, it will place the file inside of the appropriate sub folder in the D-Sweeper directory.

Name:  folders.JPG
Views: 62
Size:  9.6 KB

D-Sweeper is intelligent, so it will check to make sure that a file it wants to move does not already exist inside of one of its subdirectories. If it finds a file that does already exist, it will ask you if you want to overwrite the file. You can either answer Y or Yes, to tell D-Sweeperto overwrite the file, or N or No to tell it to skip it. Also, D-Sweeper only organizes files, not folders, so it will not affect any of the folders on your desktop.

When your desktop starts to get cluttered again, simply run D-Sweeper again to clean it back up. You can use it as a regular desktop cleaner, or just as a means to quickly move and organize your files.

Technical Notes & File Type Request:
  1. D-Sweeper has been designed carefully and tested thoroughly. For those of you who script, please do not modify this script to search for files on any directory except the desktop.
  2. D-Sweeper is set up to search for the most common file types at the moment. But If you like the script and would like to have a particular file type added to it, just reply with the extension and I'll provide an update. It is also fairly easy to add other file type extensions to this script.

Authenticity:

Please take note: Below is a PGP encrypted message. Only the original author can decrypt this message, as only the original author has access to the secret key that is needed to decrypt it. Also, unless this PGP message is included in this file, the hash values of this file (MD5, SHA-256) will not match up with the authentic hash values that are posted along with D-Sweeper. Therefore, authenticity and original ownsership are guranteed.

MD5: 2f2fdd442a4853f09055de4ab84396ae
SHA-256: 800d3cf0c159bca9dd2e979b3223fa6ff278adfbeb622750dbffbcfc21930db2

-----BEGIN PGP MESSAGE-----
Version: GnuPG v2.0.14 (MingW32)

hQEMAyR0JCQV5M/xAQf9FD2JyGsyzTHefCeqOouEehTLhyWw+CpdxBBkHj3Pyi/c
dmQ799qkG4UNiRFTDwRBHygAhHFyJ9o2msUJmxYLqeNiHWnVEBqReUCVcXCN7la5
aAwVavKugr3zgtTXQCeobQt5S6vZmEWv9PM5NMb3Mwhw8puRUvc67OWRhZvxrudy
T/ENasU6Ruimxs9tuRINJsxJ+mYJYK+QxI0fgyr7F0q9ORvgo4xktFNdaX5iz8pd
aHrpF5LRlLvLVXZrgvGpN8l+WmI61TOPpej7Tf9W9ksQlEsOGihNDAVN0bkMEkv5
LOw3ySW1ia7tyXjdFFxGkaUepcJFSMrR3XuXjwMxmtLAmQHxKyxFiV7Hbk+e55dh
k4/a1Nnr9xUgIXxOAAy9n2plMa50U36KxgqjpsmU54Qu2wWJzRlQdLLEsjANs/50
7UpPUd0nYaPzgak7YLE2jCTc54IBEd70b0v7OguYDNNR6MLKHfRt+kE0oNhm9cLM
IgqU6VQxrKro1W2XvElC3ONGPOcSh+BmKENE+AGgutzxwhfwr2mPguqAnyENLFhY
1Q2HJ9uBEOfGlZyI5VcOOFYwR2wIPmvrCh80Kj71K+W+nT4txrAgBu3fg/AhIlo2
4K1/wRl/HukQ5QdMFONNylVIW71NmQz2xt8kbp7mgGcptM64f12maQ4sMRFyWxGu
ExdHXzTXtova9RjPcMpAM5c+CDoUE4803ycLW94/lGnKn/3z13SqxCFW0VX9eYoO
Rtyi9GSXZIpVCeJrmsYvHzSp7wicnz1aU1/aYC1duskwcUJGrL+sM153gQ==
=QZRN
-----END PGP MESSAGE-----

Happy Sweeping



My System SpecsSystem Spec
.

Reply

 Quick Tip: Organize a Sloppy Desktop in Seconds with D-Sweeper 1.0




Thread Tools



Similar help and support threads for2: Quick Tip: Organize a Sloppy Desktop in Seconds with D-Sweeper 1.0
Thread Forum
Video playback is sloppy in Windows 8 Music, Pictures & Video
Solved Windows Update quick question (2 seconds to read) Windows Updates & Activation
Defer desktop lock for a few seconds General Discussion
Quick Desktop Customization question... Customization
Organize Your Windows7 Desktop with Fences. Customization
Solved Is there a quick access to the Desktop? General Discussion
Desktop Icon on Quick Start Customization

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 01:39 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33