SEARCH

How-To Geek

Easily Load Your Digital Picture Frame and MP3 Players with Randomly Picked Media Files

title

Has your digital picture or music library become so large that you have a hard time sifting through them to load up your devices? Well, why do yourself what your computer can do for you? With a simple customizable script, you can easily have Windows pick random files from one folder and copy them to another.

Uses

While copying random files from one directory to another is certainly not a traditional function, it does have its practical uses:

  • Load up a digital picture frame with random pictures from your library.
  • Pick random music from your music library to fill your MP3 player.
  • Anything else you can think of… post suggestions below.

Customizing the Script

Before using the Copy Random Files script, there are a few settings which you need to make (just right click on the script file and select Edit to open it in Notepad). The location of where you need to enter this information as well as additional details are clearly labeled in the script.

  1. Destination Folder – the directory where the random files should be copied to.
  2. File Filter – optionally specify the types of files you want to pick from (i.e. only JPG and PNG or only MP3 and OGG files).
  3. Search Sub-Directories – should the source include files from sub-directories as well?

You can create as many copies of the script as you want. So you can easily create a copy which picks random pictures, one which picks random music, etc. Just duplicate the Copy Random Files script, give it an appropriate file name and then customize accordingly.

Adding the Script to your Send To Menu

The Copy Random Files script is designed to work from your Send To context menu.

Open the Send To folder by navigating to:

“%AppData%\Microsoft\Windows\SendTo”

Or you can just paste this location into your Run menu.

image

Create a new Shortcut in the Send To folder.

image

Select the source script which you have customized.

image

Enter a title as you want it to appear in the Send To menu.

image

Once finished, you can optionally change the icon which appears in the Send To menu by opening the Properties dialog of the newly created shortcut and clicking the Change Icon button.

image

Select the icon you want to use and apply your settings.

image

Using the Copy Random Files Script

Once the shortcut is in place, you can now start the copy function via the right-click context menu. Simply navigate to the folder which contains the files you want to copy from, right click on a file or folder and select the copy random files shortcut you previously created.

Note that you must be in the folder you want to be the source when you invoke the function. In our example below, if we were to invoke the command by right-clicking on the Sample Pictures folder in the parent folder (Libraries > Pictures), the parent folder would be picked up as the source folder instead of the Sample Pictures folder.

image

Once you select the command, the script will summarize the current configuration options and scan the source folder for the number of applicable files. This can take a while if you select a folder which contains an enormous amount of files. Once this is done, you will be asked for the number of random files to copy.

image

The script will run and copy the appropriate number of random files. You can view the progress by looking at the title bar during the copy process.

Note that if a file with the same name exists in the destination, it will be overwritten.

image

Once finished, you can see the files copied are a random subset of the source files.

image

 

Download Copy Random Files script from HowToGeek.com

Jason Faulkner is a developer and IT professional who never has a hot cup of coffee far away. Interact with him on Google+

  • Published 04/12/11

Comments (6)

  1. Barbara

    WOW … you must have been reading my mind. About a week ago, after picking two jpgs here and three jpgs from there, I fervently wished for a simpler way to do this. And voila! Here you are with the answer. THANK YOU!!!!

  2. Geet

    just tried this out. this utility is simply amazing.

  3. Grey Brother

    This program is awesome! I use it to copy random MP3′s to my SD card for use in my portable media player. Your program is just perfect for the job. Thank you!

  4. Kanj

    Thanks a lot!

  5. Pierre-Louis

    I must be the only one to think there is absolutely no point in this… :\

  6. erick

    I am getting an access denied response and yet I am the sole user of my laptop and have no passwords / subaccounts set up.

    Any ideas ?

Get Free Articles in Your Inbox!

Join 134,000 newsletter readers

Email:

Go check your email!