Outside LOTRO: Screenshot Organizing with PowerShell

January 22, 2010 | by

Guides

Please note: This guide is only intended for Windows-based systems.  If you have instructions for Linux and/or Macintosh systems, feel free to post a description or link in the comments.

When I was playing WoW, I came across a post on how to organize screenshots for free using Windows Powershell.  I thought that this would be an excellent subject matter for LOTRO players as well, since we have so many screenshot artists throughout the community.  So I’ve gone ahead and modified the screenshot script for WoW, created one for XP and another for Vista/Windows 7, and created this guide.  Now don’t let the length of this article frighten you off.  Setting this up is fairly easy although it may take a little time and it takes absolutely no scripting knowledge whatsoever and it’s absolutely free.


Installing PowerShell


The first step to setting this up will be to install Powershell if you do not already have it installed.  Now For those of you with Windows 7, you should have Powershell installed by default.  For those with Windows Vista or XP, you can install Powershell by downloading and installing the Windows Management Framework.

After installing the Framework, go ahead and open the Powershell command prompt by going to the Start Menu and opening All Programs > Accessories > Windows PowerShell > Windows PowerShell.  You should now have a screen open similar to the following:

Blank

WARNING: The following command enables PowerShell scripts to run without being signed from a certificate authority.  If you want to run a more secured version of the script you can see this page for more details on how to do that.

Basically, it looks like a Command Prompt with a blue background.  Now that this is up, go ahead and type the following at the prompt:

Set-ExecutionPolicy RemoteSigned

Execution Prompt

You will receive a notice asking if you want to change the Execution Policy.  Type Y for “Yes” and press Enter.  You will then be returned to the command prompt.  If you want to make sure that it worked, go ahead and type in:

Get-ExecutionPolicy

and press Enter.

Remote Signed

If the value “RemoteSigned” is returned, then your settings are correct.   See, wasn’t that easy?


Setting up the Script


Now that PowerShell is set up, go ahead and download the script from here.  Now, extract the scripts to a location on your computer that you’re comfortable with.  I personally created a folder on my C:\ drive named “Scripts” (C:\Scripts), but you can put the files anywhere so long as you remember where they are located.  Now, there will be two .ps1 files.  One will end in “XP”, the other in “Vista7”; if you are running XP use the “XP” file, and if you’re using Windows Vista or Windows 7 use the “Vista7” file.

Go ahead and locate the directory that contains your screenshots for LOTRO.  By default they should be in the following locations:

Windows XP: C:\Documents and Settings\%username%\My Documents\The Lord of the Rings Online

Windows Vista / Windows 7: C:\Users\%username%\Documents\The Lord of the Rings Online

Where %username% is the user account that is logged into the computer.  If you’re not sure that they’re in this location, you can copy either of the locations above, go to the Start Menu, click on Run, paste them into the box and hit enter.  If you see your screenshots, then you don’t need to modify the files.  If you don’t see your screenshots, then you will need to edit whichever file you choose to use.  Please note that you will only use one of the files and can probably go ahead and delete the other file.

Should you need to modify one of the files to point to a different directory, open one up and change the following entry (the first line without a #) to point to the correct directory.

$default = "C:\Documents and Settings\$env:Username\My Documents\The Lord of the Rings Online"

Make sure to leave the double quotes intact, or the script will not work.


Running the Script


Now, returning to the Powershell window type at the command prompt  and type in the full path of the file.  For example, assuming that the scripts are located in the C:\Scripts and I am using the Windows XP file “ArchiveSreenshotsXP.ps1”.  I would type in the following:

C:\Scripts\ArchiveScreenshotsXP.ps1

Excecute File

After doing so, if you have a lot of screenshots from a lot of different dates you’re probably going to see quite a bit of output as folders are created and moved.  If you don’t see anything or if you receive text that is in Red Text there is probably an issue with the location or there are no screenshots to organize.  However if you ran it successfully you should go from a directory that looks something like this:

Folder Before

To something like this:

Folder After

All your screenshots will now be organized in folders by Year, then Month, then Date.

Folder Structure

If you’re willing to play around with the scripts some, you can alternatively store the files in a different location and a different file structure.  However, that is outside the scope of this article.

Now, the only downside that I can see that will result from this is that when you take a screenshot with the in-game screenshot function any new pictures you take will start off with the name ScreenShot00000.jpg.  So you will have files with the same name which may be a bit confusing, however they will be located in different locations on your hard drive.


Automating the Scripts


But let’s say that you don’t want to run the script manually and wish to have your directory organized on a daily basis.  Well, setting that up is definitely easy enough.  General guides on how to schedule tasks in Windows XP can be found here, one for Vista can be found here, and a brief guide for Windows 7 here.

For Windows XP:
  1. Go to Start Menu > All Programs > Accessories > System Tools > Scheduled Tasks
  2. Click on Add Scheduled Task
  3. Click Next
  4. Under Application choose Windows PowerShell and then click Next
  5. In the name field, you can type whatever you would like for the name and you can select to perform the task as often as you’d like.  Personally, I’d choose either Daily or Weekly.  Click Next.
  6. Choose whatever time you would like the task to run (I usually pick a time when I know I am not at the computer and it will still be on), when to perform the task, and the start date.  Then click Next.
  7. For the username and password you will want to choose someone who has permissions to the screenshots.  Most of the time you can use the same account you use to log into the computer, or you can choose an account with Administrative privileges.  Then click Next.
  8. Check the box that will open the advance properties and click Finish.
  9. Now, in the box that says Run: you will want to append the location of the script.  So, as in the previous example, if my script is in the C:\Scripts folder and is named “ArchiveSreenshotsXP.ps1” I will type in “C:\Scripts\ArchiveSreenshotsXP.ps1” including the quotation marks so that the entire line will look something like this: C:\WINDOWS\system32\WINDOW~1\v1.0\POWERS~1.EXE “C:\Scripts\ArchiveSreenshotsXP.ps1” XP Task
  10. Go ahead and click OK and you should be set!
For Windows Vista and Windows 7:
  1. Use the search bar to search for Task Scheduler and you should be able to open the program that way.  Or you can go to the Start Menu > Control Panel > Administrative Tools > Task Scheduler.
  2. On the right panel click Create Basic Task
  3. In the Name and Description fields, you can type whatever you would like and then click Next.
  4. Select when you would like the task to start and click Next.
  5. If you are prompted with a schedule, go ahead and choose the schedule you would like and click Next.
  6. Keep the Start a Program option selected and click Next.
  7. For the Program/Script field you can most likely type in just “powershell”, but to be safe you can browse to Powershell.exe which is most likely located at “C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe”
  8. For the Add Arguments field type in the full path to your script.  So, as in the previous example, if my script is in the C:\Scripts folder and is named “ArchiveSreenshotsXP.ps1” I will type in “C:\Scripts\ArchiveSreenshotsXP.ps1” including the quotation marks so that the entire line will look something like this: “C:\Scripts\ArchiveSreenshotsXP.ps1” Win 7 Task
  9. Click Next
  10. Click Finish

And that’s it!  Now your screenshots will be automatically organized for you on a daily basis according to the date that they were taken.  If you have any questions or issues, feel free to comment here or better yet email me at merric@casualstrolltomordor.com.

, , ,

About Merric

Merric is one of the Co-Founders of CSTM. He is avid about technology and will willingly bore anyone he can about the topic. While he mainly plays a Guardian, he is attempting to level one of every class. By trade Merric is a Windows Systems Administrator for "the man" and holds several MCSE's in 2000 & 2003 as well as Network+, Security+, and A+.

View all posts by Merric

Subscribe

Subscribe to our weekly email newsletter for all the latest LOTRO news sent to your inbox!

4 Responses to “Outside LOTRO: Screenshot Organizing with PowerShell”

  1. Battlemaiden Says:

    Great guide Merric! This looks very handy, I’ll definitely have to check this out.

    Reply

  2. Tony Says:

    Wow, this is great. You guys are always awesome.

    Reply

    • Merric Says:

      Thanks Tony! It’s a bit technical, but I’m interested in scripting and the blogger’s original post really helped inspire my delving into it. :)

      Reply

Leave a Reply