19. October 2017 · Comments Off on Automate Downloading Web Images to any Folder · Categories: AutoHotKey, Graphics, Scripts · Tags: AutoHotKey, Command-line Tools, Windows
Last updated on 05/12/2020

Automate saving web images to a specified folder by copying image URLs to the clipboard using an¬†AutoHotKey (AHK) script. Usually, the process to save a web image from a browser consists of: (1) right-click the image, (2) select “save picture as”, and (3) navigate to the folder to save the image. While usually acceptable for single images, this process can can be slow and tedious for multiple images.

folder and images

AutoHotKey and Wget need to be installed for the script to work. The version of Wget used for this guide was wget-1.19.1_curl-7.52.1_win32_win64.7z, a portable package with Curl that includes the 32-bit and 64-bit versions of Wget, a ca certificate, localization, and a manual. The latest Wget windows binaries may also be downloaded from eternallybored.org.

The script was tested on a 32-bit version of Windows XP, using portable versions of AutoHotKey and Wget. The only modification needed for a portable installation of Wget is to set the path for the wget or wget64 executables in the script. The script will work without modification if Wget and AutoHotKey are already installed and the paths for AHK and Wget were set by the installer. Paths can be checked with the “set” command from a windows prompt, or by using Control Panel -> System -> Advanced Tab -> Environment Variables -> System Variables -> Path.

AHK Script Download

(Click to view, or right-click and use “save Link Target as” to download):

  wget photos cects.txt (3.1 KiB, 2,422 hits)

Setup and Use:

Setup
Before using, enter the path to the wget or wget64 executable in the script if wget is not in the system path. Optionally, enter a full path to an icon file for the script. Also, the extension of the script must be changed from txt to ahk.

How to Use

  1. Start the script with a double-click
  2. Enter or paste an existing folder path to save downloaded images and click OK. If no path is entered the default path will be the same folder as the script.
  3. Right click an image in your web browser and select “Copy image URL”
    1. A cmd window opens and displays downloading progress. It closes after the download is completed
    2. The image URL and date are appended to photolog.csv in the specified folder
    3. All characters after jpg. jpeg, gif, or png are removed from the URL before downloading
    4. URLs that don’t include the jpg, jpeg, gif, or png extensions are ignored
  4. To change folders, reload the script and enter a new existing folder path

Context menu tools such as FilemenuTools may be used to start the script and set the download folder automatically from any location.

If you have found a spelling error, please, notify us by selecting that text and pressing Ctrl+Enter.

Print Friendly, PDF & Email
Share
language
">Bear

Bad Behavior has blocked 2190 access attempts in the last 7 days.

Spelling error report

The following text will be sent to our editors:

site-map