Adobe Lightroom and exporting to subfolders

For some reason, versions 1 – 3 of Adobe Lightroom cannot export images in a way that mirrors the original structure of your photo library. I can’t offer a reason why other than it was missed by the development and design teams. There’s been enough interest in it apparently that there are more than a few free and pay solutions to the problem.

I looked at a few of the options and for one reason or another, I decided that I didn’t want to use the plug-ins/extensions and came up with a simple solution using a bit of naming trickery. I use this technique for SnugUp.

Here’s what I did in Lightroom version 3.

  1. I selected the photos I wanted to export.  (I generally use the Quick Collection Feature)
  2. File > Export (CTRL + SHIFT + E)
  3. Adjust the Export To option to point to a specific folder of your choosing (in the example below, I set the folder as E:\PhotosBackupJPG
  4. You may optionally put them in a subfolder of your choice (I did not)
  5. Next click the Rename To option and select "Edit…
  6. Clear any value that may already be in the text box below the Example (just highlight the text and press delete).
  7. Then, edit the template to be Folder Name and then Original filename. Select those by using the Image Name grouping. Click the Insert button after each.
  8. Then, I added some text that I knew would be unique to be used as a separator (=-= equals minus equals). To add the text, just click with your mouse  between the two values you just inserted. I know that none of the file names in my library have this exact combination of characters in them. It’s important later. You can confirm this by using the search feature in Lightroom if you’re not sure.
  9. Click on the Preset (yours may say something else) and then click “Save Current Settings as New Preset
  10. Give it a name that you’ll remember (I called mine Folder-Filename) and hit Create.
  11. Adjust the remaining settings per your export needs and begin the process by clicking the Export button.
  12. Wait patiently. Then go do something else as you realize it’s going to take a lot longer than you had expected/wanted.
  13. Now, the next step is the simple trickery. What we’ve done is named all of the files so that they include the folder name as well. So, using a Powershell 2.0 script (Powershell is available for all modern versions of Windows as part of a package download here). So, download it now if you don’t already have it. (You can check for it by looking for Powershell ISE as described in the next step if you’re not sure. You probably have it if you’re using Windows 7).
  14. Start Windows Powershell ISE (in Vista and Windows 7, just type “power” into the Start menu search):
    imageThe reason I suggest the ISE (integrated scripting environment) is that it’s easy to just get stuff running without a lot of hassle.
  15. The ISE will start:
  16. I performed the move/rename in two steps so I could verify things between each step. If you’re familiar with Powershell, feel free to combine them into one step. It’s simple enough. First grab the entire script below and paste it into the top pane (under the tab labeled Untitled1.ps1):
    $root = #"E:\PhotosBackupJPG" $items = Get-ChildItem $root foreach($item in $items) { $path = [regex]::split($item.Name, "(=-=)") if ($path.length -eq 3) { $destPath = $root + "\" + $path[0] if (!(Test-Path -path $destPath)) { New-Item $destPath -type directory "New folder: " + $destPath } Move-Item $item.FullName $destPath } }

    I’ve intentionally left an error in the file so that you’re forced to make the change. Unless you have an “E” drive and the path, “PhotosBackupJPG”, the script needs a tiny modification to make it work.

  17. The first line of the script, $root = #”E:\PhotosBackupJPG” needs to be changed to match with the export location you selected earlier AND also the “#” needs to be removed (it’s a comment character in Powershell script). So, if you exported your photos to C:\Users\Steve\ExportedPhotos, remove the “#” and remove the text inside of the quotes on the first line and replace it with your photo location.
  18. After confirming the location points to where you exported your photos (and videos), hit the Run button (the green arrow in the screen shot below). Or hit the F5 key on your keyboard.


  19. The output (or any errors if you made a typo) appears in the light blue box in the center and when it’s complete, the word “Completed” appears in the status bar at the bottom of the application. It may take a few minutes to complete. I’d suggest looking at your export directory using Windows explorer to confirm everything looks fine before continuing. At this point, you should have some subfolders and all of the files should have been moved into the proper subfolder. Next, renaming.
  20. Click the “New” icon (first icon on left shown above) to create a new Powershell script file (or just replace the existing one, you won’t need it again for this process). In the new file, copy this Powershell script and paste it:

    $root = #"E:\PhotosBackupJPG" $items = Get-ChildItem $root -recurse foreach($item in $items) { $path = [regex]::split($item.Name, "(=-=)") if ($path.length -eq 3) { # $destPath = $root + "\" + $path[0] Rename-Item $item.FullName $path[2] } }

  21. Again, fix the $root to match with the export folder you created.
  22. Confirm it, and hit the Run button.
  23. All of your photos (and videos) will be renamed to only the original file name. The extra folder name and =-= are removed.
  24. Bask in the glory of Powershell and your file wizardy. No plug-ins necessary.

If you’d like to use something other than =-= as the delimiter between the folder and file names, you’ll need to fix the Powershell scripts. The delimiter is on the line:

$path = [regex]::split($item.Name, "(=-=)")

But, unless you understand how Regular Expressions in Powershell work, you may want to avoid this change … it’s not necessarily as simple as just replacing the text.

The scripts above do these things with each file:

  1. Check to see if it has the right pattern
  2. If so, grab the folder name and check to see if the folder exists.
  3. If it does not, create it.
  4. Move the file to the new folder.
  5. Rename the file name, removing the folder and delimiter

If you have questions, please leave a comment.

While this shouldn’t cause any harm, (especially if you just point it at a folder of exported photos and videos, which worse case you just re-export), you use technique and code this at your own risk. I can say I successfully used the script on over 30,000 exported photos without a single problem. Smile

Announcing SnugUp version 2

imageMore than a few years ago, I created SnugUp version 1, which is a handy way of synchronizing folders of images with SmugMug for Windows users. I’ve made a number of changes in the last month based on some requests and the result is a significant update (yet the core features are all there – just improved!).

New features:

  • (Changed to version 2)
  • Completely revamped look and feel (which did remove a few ‘flashy’ features)
  • Uses Click once for application updating (which should make it easier to push updates and bug fixes out to users)
  • Added settings for automatic upload (when application starts)
  • Added setting for Subcategory selection (only selection, no creation of subcategories through SnugUp)
  • Added setting for custom gallery naming
  • Completely changed settings user interface to more logically group and explain settings
  • Fixed a number of bugs (that shouldn’t have appeared to user anyway!)
  • Added support for new file extensions (to upload videos in particular)

It does require .NET 4.0 Framework Client profile (which likely you’ve already got on your machine, but if you don’t the installer SHOULD make it easy to download).

Go here ( for more information and to download. I’d recommend uninstalling the old version first.


My Nest Thermostat installation experience

imageAfter the amazing mad dash for the Nest thermostats when they were first made available for pre-order, I ordered three thermostats for our home from Best Buy (as had sold out). We’ve got a three zone heating system, and I wanted to replace all at once (as the system works as “mesh” to learn habits, if people are in the house, etc.).

Our order wasn’t scheduled to ship until January/February of 2012, so I was pleasantly surprised by their early arrival.

It’s evident that Nest has paid careful attention to the entire experience of purchase and installation as you’ll see. I can’t think of another appliance in our home that has come close. Hopefully, other manufacturers are starting to take notice that as consumers, we don’t want everything sealed in a nearly impossible to crack open plastic casing.





More consumer electronics packaging is slowly becoming part of the product experience. Apple deserves credit for being a consistent proponent of the packaging being part of the product purchasing and initial “ownership” experience.

The Nest thermostat is no different.


Opening the top immediately reveals the product. There’s no drama here, just a thermostat (covered in a plastic shell to protect the case from scratches).


The top of the box has a mold to keep the thermostat safe and secure. It’s glued to the top so it too stays out of the way of “product.”


No annoying twist ties or anything here .. the thermostat is easily removed from the box. In fact, make sure you don’t drop it as there’s nothing holding in the box.


Under the bottom mold for the thermostat is a small color welcome packet and B&W installation instructions.


When you pull out the instructions, you’ll find the remainder of the installation parts. Inside you’ll find a mini multi-bit screwdriver, the installation base, a few screws and drywall anchors, and the optional wall plates.


I had the (unfortunate?) need of 2 of the different sizes of wall plates to make installation easier.


The multi-bit screw driver was a nice touch. My only suggestion to Nest would be to investigate making the screwdriver have a slightly more “grippy” exterior. I found in a few cases where screws were overly tightened that the screwdriver rotated too freely in my hand.


As is very typical of home thermostats, Nest has included a set of stickers for the various wires you might encounter during installation. At first I read through the instructions and then went hunting through the paperwork looking for a loose set of stickers.

In fact, they’re part of the instructions and I had completely overlooked them! I’ve installed more than my fair share of thermostats over the years, and found that the ones that are labeled and colored are the nicest. The blue, while attractive from a design perspective, just isn’t as nice. If you have more modern house, it’s likely that the color of the wires match the connections, so the stickers may not be needed. While our HVAC wiring did have the modern wiring, I still use the stickers, just to make certain everything is properly connected (as I’d rather not have to call a HVAC specialist out to our house to get the HVAC working again!).


First step is to turn off the furnace. Don’t leave it on. Either kill power at your electrical panel or at the furnace itself. Many furnaces/HVACS have a power switch on the furnace itself which you can use and may be more convenient. In either case – make sure you’ve turned off the power.

To remove a thermostat, you’ll likely need to remove a few screws and maybe a wall plate. I found that the included screwdriver wasn’t long enough to reach the screws of the old thermostat, so you may need an extra (the included Nest screwdriver was still handy for removal of the wires from the older thermostat).


After removal of the wall plate and old thermostat, you may be greeted by a giant “HEY, I SUCK AT CUTTING A HOLE IN DRYWALL BUT YOU’LL NEVER NOTICE YOU STUPID HOMEOWNER” hole like I was when removing the old thermostat. If you’re as handy with drywall repairs as I am, you’ll be thankful that Nest included some wall plates.

I labeled each of the wires using the enclosed stickers and then removed the wires from the thermostat.

Be careful to not allow the cable to fall back into the wall! If the wires are stiff, you can wrap a few loose wires around a pencil or pen which should help prevent the cable from sliding back into the wall. (Or if the wires aren’t stiff, consider a piece of tape, a pencil, and the wires to be a reasonable alternative).


Next, you’ll want to see what you might be up against behind the wall. During installation of two of our new Nest thermostats, I found that the best location for the thermostat meant that one of the screws would line up with a wall-stud behind the drywall. If you weren’t blessed with a giant freaking hole like in the example above, do a bit of gentle prodding with a screwdriver to see if there are any unexpected obstacles. Use a stud finder if necessary.


For one of the installations in our house, I needed to use the long drywall screw to accommodate the thickness of the Nest thermostat mount, wall plate, and drywall into a stud. It’s a 2 inch screw. Without it, the screw wasn’t deep enough to hold the thermostat securely to the wall. I found that although the screw-head of the drywall screw was larger than the original screw included, it didn’t cause any problems when the main unit was connected to the base.

If you’re using the included drywall anchors, do the right thing and predrill. While I predrilled the hole, it wasn’t large enough to allow smooth entry, and it quickly stripped the anchor’s Phillips screw head. I had to use some electrical pliers I had in my tool bag to remove the partially set wall anchor (thankfully, I was able to just twist it slowly out).


Thankfully, I had a replacement wall anchor available that nearly matched the original, yet was a bit stronger and better made. So, a second attempt worked without a hitch.

You’d think I’d learn my lesson … however, I proceeded to wreck the second drywall anchor just as quickly as the first. Again, a replacement with a better made anchor did the trick. As you may not have replacements, be more careful than I. Don’t expect them to work well without predrilling. Note to Nest: your included drywall anchors suck and you saved money in the wrong place. The bulk package of plastic anchors I already had on hand were far better. I’d suggest considering metal ones instead – I’ve got some of the those – and they rock! (However, they were slightly too large for this installation, otherwise I would have switched to them without hesitation).


I used the square plate to cover the giant hole in the drywall and then connected the wires. As this was my third thermostat installation, getting the wires in place on this unit was much easier than the first two. I’d like to think it was “experience,” but I’m actually going to say it was a bit of luck. On the second unit, I struggled getting the 24V “C” wire connected successfully. Each time I pushed it in … it would pop back out. It was bad enough that I thought it was connected and then not until I had installed everything did I notice that the thermostat reported that I hadn’t connected the “C” wire.

(Note, the “C” wire is very important, as it’s where the Nest thermostat draws power for the unit and without it, you may have a less than stellar experience).


I’d made sure that the “C” wires were powered before beginning the installation (I actually had to add the connection myself to the furnace).

Here’s with the wires connected. If you’d wondered how you’d level a round object like this – no worries! There’s a small “level” at the top of the Nest thermostat which makes leveling a breeze (right below the nest logo in the photo below)!


I snapped the front of the unit onto the base carefully and then turned on the power to the furnace again.

A few moments later, I could see a tiny green light in the lower right corner of the thermostat and the screen activated. It’s a really great touch to the over all experience that the screen is round like the device.


It takes a few minutes for the device to begin the setup process.


The device has a tiny speaker so, it makes a few little “clicks” as it nears readiness.


As you’ll see throughout the installation, the Nest thermostat has a very simple and elegant user experience. It’s not got much flourish, … just clean lines and a simple UI. Very pleasant. Thankfully, no EULA! :)


You’ll only need to do this once ideally – setup of the Internet wifi connection. Our home’s wifi password is sufficiently complex and was particularly annoying to spin, click, toggle, spin, click…. But, it’s done with. I can’t think of a better way to do this that wouldn’t take just as much time. To select a number or character, spin the outer frame, and then “push” the frame to select. That’s really the only input the device takes from the user. Spin and click. Nice.


As soon as the wifi is connected, it downloads an update. It took about 5 minutes to download the update, install the update, “backing up software” and reboot.20111218-IMG_0146




I don’t know what “Backing up software” is doing. I hope the “Cloud” is involved somehow because that makes all Internet things better. :)


This was a very nice touch – an image of the connections I made. On the second unit I installed, this was key to my discovery that the “C” wire had become dislodged already!


In order to receive the time and temperature, your zip code is needed.



If you’ve got more than one thermostat, you’re asked for a name for each thermostat. It’s got a few reasonable defaults. You can do a custom name if you’d like directly on the unit, or later on the web site.




The thermostat asks if it should start in heating or cooling mode:


I don’t know if the unit tries to make an educated guess based on the outside temperature (obtained by using the Zip code provided earlier), or if it always defaults to heat.





One setting I‘d immediately suggest is going to settings (push the display once, spin to “SETTINGS”) and changing the “BRIGHTNESS” to auto. Just spin the outer wheel until you find the BRIGHTNESS setting and then push to toggle through the options. It defaults to medium which was much too bright at night in a darkened hallway.




After completion of installation, set the temperature as desired.

Here are some things I learned:

  • The display activates when it detects nearby movement.
  • It shows the current set temperature in the “large” font size and the current temperature in a very small font (and graphically). I’d prefer if the current temperature was made slightly larger for at a glance reading. During heating seasons, I don’t care so much about that, but I know that I use the “current temperature” far too much during the “cooling” season to decide how freaking hot the house is and whether it’s finally time to turn on the air conditioning.
  • There’s no on-screen clock. I’m amazed how much I relied on the clocks on the thermostats for knowing what time it is (or at least a confirmation of what time it is). I miss that already. They easily could add that and would love to see it added.
  • Predrill for the screws (both the drywall anchors and other screws). You’ll be more successful and end up less frustrated.
  • Expect that it will take you longer than you’d thought. It took between 30-60 minutes per thermostat to install. If you hit a problem (like a wall stud for example), you may find it takes longer. In fact, you might want to remove the old thermostat by removing the wall mount before you even start to see what you might be up against – in case a trip to your local hardware store might be necessary.
  • Install power to the unit (the “C” wire).
  • Be careful and go slow.

Download the app for your iPhone or Android device and enjoy remote control of your HVAC system!

You may also use their web site to adjust settings, temperature, etc. You can even change the name of the thermostats (in a multi-thermostat dwelling at least).


The web app shows the current set temperature and the current temperature.


Not that here they did the same thing and put the current temperature on the spinning gauge of the dial. It’s more difficult to read there than it should be. I don’t know why Nest considers the current temperature so unimportant.


Update #1, Update #2, Update #3, Update #4, Update #5, Update #6


I took many of the nest box photos in a white portable photo box with my iPhone 4S (all photos were taken with the iPhone). Our Ragdoll cat thought it was great fun, so I’m including a few obligatory pet photos. I’m amazed by the quality of the camera (especially the second one)!



Windows Home Server 2011 & “the server appears to be offline” when trying to connect to the LaunchPad

Within the past few days–maybe after a recent Windows Update–one of my laptops started to fail to successfully connect to the WHS 2011 server I’ve got in my home. The error was “the server appears to be offline” and asked if I’d instead want to connect off-line. (Yeah, no thanks.)

A bit of hunting on the Internet later – no one had a clear path to success. Most reported continual failures when trying to start the LaunchPad or start a backup manually.

I had success by doing the following:

  1. Start > View Local Services (you can type “services” for a quick match)
  2. Find Windows Server Health Service and start it if it isn’t already started.
  3. Find Windows Server Client Computer Backup Provider Service and start it if it isn’t already started.




Neither of these were running on my laptop even though they both were set to Automatic startup. As soon as I started them manually, the LaunchPad immediately began working, and manual backup became available again.

There were no errors in the Windows Event Viewer explaining why they may have failed to start. As I don’t reboot my laptop frequently, this fix will remain in place for a while (and I’ll need to remember to check these in the future potentially).

Hope this helps someone else.

Oh Microsoft, How you Mesh with My Head.

imageMicrosoft, I’m confused. You release Windows Live Essentials and say that the new Live Sync is the Old Live Mesh, and that the Mesh as I know it, is going away. To add to the insult, the storage is dropping from 5GB to 2GB I’m told. It’s annoying, but I switch. I even switched early as a beta tester and had to suffer greatly through “cannot connect” and “please reboot or reinstall” errors.

Now, you’ve sent me a notice that Windows Live Mesh 2011 is available?

I’m confused. I must not be alone in this.

Windows Live Sync which replaced the Beta of Windows Live Mesh apparently has been renamed to a less consumer friendly name, but regained the features of the old Mesh beta product. 


XP isn’t supported any more. I wish Windows Home Server was officially supported. It would make for a great place to sync files and a easier way to gain access to the full WHS desktop from anywhere.

By the way, during this confusing period, I switched to DropBox anyway. Sigh.