Tag Archives: batch

Run a Batch File Invisibly

Running a batch file invisibly can come in handy, especially if you manage computers for other users. It allows you to perform a task without the user knowing anything about it.

Its very simple. Instead of telling the batch file to run, you tell a Visual Basic script to launch the batch file; and Visual Basic has the ability to launch things invisibly.

Follow this demo and you’ll be up and running in just a few seconds

You’ll create two files: the vbs script and a sample batch file


Open Notepad, and paste this content, then save the file as invisible.vbs to the Desktop

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\Documents and Settings\%username%\Desktop\1.bat" & Chr(34), 0
Set WshShell = Nothing


Open Notepad again, and paste this content, then save the file as 1.bat to the Desktop:

echo hello > "C:\Documents and Settings\%username%\Desktop\1.txt"


Now double click on invisible.vbs. You should see a 1.txt file get magically (invisibly) created on the Desktop.

That’s it! Modify to your liking!

Automatically Upload Photos to Flickr

Here’s how this will work: you’ll plug in your card reader or digital camera and all your photos & videos are automatically copied to the folders of your choice in about 3 to 5 seconds. Once the photos are copied to the PC, they are automatically removed from the card (this is optional, but recommended). After they have been deleted from the card, they are automatically uploaded to your Flickr account (as private, public, tagged, not tagged, whatever). All in the background without you having to do a thing.

I set this up because my photography workflow had turned into something horrid: I have two digital cameras that we use. One of the two has video, but I don’t use Flickr for my videos, I use Motionbox. So to get photos or videos off the cameras involved the following:

  1. Plug in each card
  2. Copy the pics from the card to the PC, name the folders, etc
  3. Copy the videos to the My Videos folder
  4. Delete the photos & videos from the card
  5. Use the Flickr Uploadr and hope it successfully uploads all the pics
  6. Upload videos to Motionbox.
  7. Come back later and delete the photos & videos off the PC after they got uploaded

I decided to put a little thought into it and get a better setup. I now do the following:

  1. Insert flash card into card reader right after taking pictures – pictures & videos download automatically in less than 10 seconds – card automatically formats (optional, but recommended)
  2. (photos are now uploading to Flickr in the background – so I leave :) )

I’ve completely eliminated my involvement with the computer. I simply plug in the card reader (or camera) and the computer takes care of the entire process of copying the photos over to the computer, then deleting them from the card. It then automatically uploads the photos to Flickr as private. All in the background without any of my involvement.

You can modify the batch file to upload all photos and videos to Flickr.

There are several steps you’ll need to take in order for the process to be completely automatic. Here is an outline of what all is involved. Start to finish the process takes about 15 minutes.

  1. Give Digital Cameras persistent drive letters (E:, F:, G:)
  2. Download Python
  3. Download the “Uploadr” python scripts
  4. Download the batch file for your camera
  5. Install TweakUI and add Batch file to the AutoPlay menus
  6. Configure AutoPlay for your digital camera
  7. Test it out

First Step

Give Memory Cards and Digital Cameras persistent drive letters (E:, F:, G:)

In order for you to be able to reliably copy images from a particular card or device, you should set it up so that every time you plug in the device it uses the same drive letter. With your memory card or device plugged in, right click My Computer and select Manage:


Select Storage ⇒ Disk Management (see picture)

In the right panel, your devices will be listed, probably with letters like E, F or G. Do not change the drive letter of the C: drive, and you probably shouldn’t change a D: drive if you have one either. Right click on the flash drive that you need to change and select Change Drive Letter and Paths: (see picture)

The next box shows you the letter that is already assigned. Just click Change:

This box will ask you what letter you want to assign to it. I start from the bottom, in this case, Z: (see picture)

It will ask you to confirm this. Click Yes. (see picture)

Repeat this for each card or camera that you would like to setup for this.

Now if you go to My Computer, your drive letters should be updated to the new letters.

Next Step

Download Python

How to Batch Resize Photos in Photoshop

How to Batch Resize Photos in Photoshop

Resizing groups of photos is very easy if you are using Photoshop. I am using Photoshop CS3 on a Mac in this example. Though I am not sure if this works in Elements, I do know that it works in CS2 on both a PC & a Mac.

Here’s the concept: you have a folder full of JPG files and they are all very large. You want to resize all of the photos at once, or you want to create small copies of all of the photos at once, but save it to another location. No problem.

Just click the File menu, and hover over Scripts, then select Image Processor:

Script Image Processor

Be sure to check out my Photoshop site
with High Resolution Video Tutorials