Sunday, February 16, 2014

// // Leave a Comment

How to Easily Move and Organize Files by Type In Windows

How to Easily Move and Organize Files by Type In Windows

Tonyisright.blogspot.com

The Command Prompt is so useful that it’s hard to not want to use it all the time. There are so many practical uses for it to expedite processes like cleaning up old Desktop items or ending running processes. Another helpful solution is when it comes to moving files. The simple move command can be set up in such a way to move all files under a certain file type.

Do you have many AVI video files mixed in with PNG images all listed in your Documents folder? This hectic mess needs to be and should be organized pronto. How will you find your images if they’re stashed away with documents or videos? We’ve described an easy way to extract file types from a folder and place them in their proper place on the computer. After reading this article you’ll be able to move all your documents/videos/images/downloads/etc. into their proper folders with ease, organizing your files as if they were in a download manager.

Make the Batch File to Move Files in Windows

The following command will move all JPG images from the current directory to the Pictures folder. To begin, you can either enter the command in the command prompt or create a batch file to run within any directory to do the moving.

For example, copy the following command:

move *.jpg %userprofile%\Pictures\

Now open Notepad from the Start menu and enter the command in the new file. Save this as MovePictures.bat. Be sure to change the Save as type drop down to All Files.


Now copy this file to your Desktop. Run the batch file to move every JPG image from the Desktop to the Pictures folder. If you need to clean up a different folder, like one full of videos and images, place the file in that folder and then open it.

Customize the  Batch File


Customizing the batch file is very easy. Change which image files will be moved by modifying the *.jpg portion. However, ensure the * symbol is still present no matter what the file type it’s changed to. For example, here’s a way to move PNG files:

move *.png %userprofile%\Pictures\

Aside from changing the file type, you can change the destination folder too. Make the change to the final location, like so:

move *.png C:\Images\

Note: The folder must be present for the batch file to work else a syntax error will display in the command prompt. If you’re moving files to the C drive under a folder called Images, ensure the folder is actually present, for the batch file won’t create it.

Basically, this is the structure the command must take:


move *.FILETYPE LOCATION

This should be easy to remember because the command will move a file type to a location, just as the structure of the command has been written.

Now that it’s understood how to modify the command, you can combine a few modifications to move multiple file types at once. This can be done for not only image files but also video or executable files. To move multiple file types at once, create a batch file like this:

move *.png %userprofile%\Pictures\
move *.gif %userprofile%\Pictures\GIFs\
move *.mp3 %userprofile%\Music\
move *.mkv %userprofile%\Videos\
move *.avi %userprofile%\Videos\

Conclusion

Organizing files is made easy with the Command Prompt. Literally any file type can be utilized, so experiment with it and see how clean and organized you can make your computer. You may even be able to use these commands

Read More
// // Leave a Comment

How to Clean Up Old Desktop Items Quickly Through Command Prompt

How to Clean Up Old Desktop Items Quickly Through Command Prompt

Tonyisright.blogspot.com


Your desktop is probably the first place to get cluttered. Without a download manager, most files end up on the desktop alongside text documents, pictures, etc. for easy access at any time. A problem can quickly arise when your window is nearing it’s capacity but you still want to add more items!

Instead of dragging whole sections into a folder or deleting random files just to make room, consider using a batch file to move the oldest items away and out into a separate folder.

Commands For Moving Old Desktop Files

ROBOCOPY C:\Source C:\Destination /move /minage:7

So what do each of these commands do and how do you customize it to fit your own system?

ROBOCOPY: This stands for Robust file copy. We use this to do the copying procedure.
C:\Source: This is the source of where ROBOCOPY will look to do the move from.
C:\Destination: ROBOCOPY will move the files to this location and away from the Source.
/move: Although ROBOCOPY is a copy command, we can add this switch to make it do a move operation instead.
/minage: This stands for Minimum age and the number following this switch tells the function to exclude files newer than that many days. In other words, for this example, it will tell the move operation to only move files older than the specified number of days.

Here are a few examples of how you could use this batch file:

ROBOCOPY %userprofile%\Desktop C:\OLD-DESKTOP-FILES /move /minage:30

The above commands will move desktop files older than 30 days out of their directory and into a folder on the C drive called OLD-DESKTOP-FILES.

ROBOCOPY %userprofile%\Downloads C:\OLD-DOWNLOADED-FILES /move /minage:30

This is a nice set of commands to clean up your Downloads folder.

How To Run Commands

There are two ways I’d recommend running these commands. The first is with a pre-made batch file and the second is using the command prompt directly.

Using a Batch File

Open a notepad program and enter the command you want to use. For example, pick one of the above commands, or write one yourself, and enter it in the notepad program.


Save the program as Filename.bat. Ensure you pick All types in the Save as type dropdown. Now just run the batch file and you’re on your way to a less cluttered area.

Using Command Prompt

Because a batch file is simply a command that can be executed like a program launch, we can simply run our commands right from the prompt.

I recommend the batch file method so you can run it with ease whenever you like and not have to remember the command or refer to a document to type it back up.

Conclusion
Keep your desktop and folders from getting cluttered by moving out the old files with ease. Whether you use the command prompt directly or create a batch file, you’ll find your folders get cleaned up much easier than they would otherwise.
Read More