ClipboardDownload - Allows you to download a URL you've copied. Straightforward operation for most files, but smart enough to figure out the real URL on many hidden video files. ########## WHY YOU CARE 1 - It saves the file with a name based on the entire URL. No more file name clobbering when you save multiple galleries in a single directory! 2 - It can track down the actual URL for a few popular video websites. ########## WHAT TO DOWNLOAD The default configuration only accepts files whose "mime type" starts with "image", "video", "music", or "application". That means it will never download an error page (whose mime type starts with "text"). This also means you can't download ordinary web pages or text files using this script! ########## WHERE TO PUT THE FILE: To determine the download destination, you have options: - Run the script with no arguments -or- no URL in the clipboard to toggle a right-click option for folders. From then on you can just right-click a folder and select "Paste Copied URL Content Here". - Drop a folder on the script to download the current clipboard URL into that folder - Pass the folder on the command line as an argument to the script. But seriously, nobody uses the command line any more! ########## HOW TO COPY A URL No, really! There's a trick. If you have a good link to the file, you can copy it the usual ways: - Copy the URL right out of the browser location bar - IE: Right-click a link or image and select "Copy" or "Copy Shortcut" - FireFox: Right-click a link or image and select "Copy Image Location" or "Copy Link Location" But there are times you can't find a real URL for the file you want. These buried URLs are almost exclusively a tool of video sharing sites. For example, youtube.com doesn't give you a clean link to download their video files. In that case (and assuming the associated XML setting file has appropriate instructions) the script can be given the URL of the web page that hosts the video. The script will then read through the web page(s) and track down the actual URL of the video -- and then download it for you. ########## WHAT TO NAME THE FILE If you collect pictues or videos from online collections, you can easily end up with several identical "1.jpg" or "1.flv" files. To prevent name collisions (and help you remember where you got each file from), the script names the downloaded files based on the complete URL. Since video files are generally pretty well hidden or have random paths to prevent bookmarking, the default setting is to name the video file after the original URL that was copied (typically an html web page that had an embedded flash player in it). For example, if I copied the Google logo URL: http://www.google.com/intl/en_ALL/images/srpr/logo1w.png ...it would save the file with this name: google.com-intl-en_ALL-images-srpr-logo1w.png But let's suppose I like the Rick Astley video from here: http://www.3gpdb.com/videoy.php?b=t_qHEVT8HBM It turns out the actual URL for this video is: http://www.3gpdb.com/3gpvideo.php?k=ZOU8GIRUd_g&t=c85033577749b683077e16e85371f093 ... but those actual URLs have a way of changing! Some of them are full of lots of random numbers to stop people from bookmarking the actual video file. To be sure I don't download the same video next month with a different name, the default is to save files with a name based on the source (original) URL. So in this case the final file would be named: 3gpdb.com-videoy.php-b=t_qHEVT8HBM.flv If there's some reason you'd really prefer to use the final (actual) URL as the basis for the file name, you can do that by editing a line in the script. Change the line that says: gintFileNameType = FILE_NAME_ORIGINAL to: gintFileNameType = FILE_NAME_FINAL While you're digging around there, you'll find an entire section where I've put settings I though you might want to change to suit yourself. Look for something like this: '************* USER EDITABLE AREA ************************* gintFileNameType = FILE_NAME_ORIGINAL Const KEEP_MACHINE_NAME = True Const DEBUG_MESSAGES = True Const CONTENT_TYPES = "video/ image/ audio/ application/" Const RIGHT_CLICK_TEXT = "Paste URL Content Here" '************* END OF USER EDITABLE AREA ****************** -------------------------------------------------------------- All three files contain the same code. Download the most convenient one. Downloading Notes: VBS FILE IE may try to run the VBS file instead of downloading it! You'll have to right-click and select "Save Link" or "Save Target" to save the file to your hard drive. TXT FILE Be sure to save the downloaded file with a VBS file extension. If your Windows has the default behavior of hiding file extensions, you will have to quote the file name. For example, don't save it as test.vbs, but as "test.vbs". Using quotes forces Windows to honor your file extension. XML FILE This is the configuration file for the script! It has a list of video web sites with instructions on how to download the actual videos. If you don't have a copy of this XML file in the script directory (or if the copy you have is corrupted), the script will go back to the ericphelps.com web site and download the XML file every time you run it. ZIP FILE No problems. The zip file has the VBS and XML files as well as a copy of this ReadMe file.