• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 365
  • Last Modified:

How to open an image file with a command line

Running Windows 7, I have an Email notification program which allows me to execute a file when a particular type of Email arrives in my POP3 account.  I would like to use this function to display an image on my desktop.  The image is not -- in and of itself -- executable (e.g., image.jpg).  The application I use for opening this image is C:\Program Files\Paint Shop Pro\psp.exe    Can you provide me with a command line which will open the image file, rather than just the psp application?  Thanks!
1 Solution

Start C:\img\image1.jpg
will open the image in the default viewer. Can be used in a batch script for example.
I believe you should be able to supply an argument to the psp.exe application that causes it to open the file.  The command "C:\Program Files\Paint Shop Pro\psp.exe c:\images\img.jpg" should do it.
ddantesAuthor Commented:
holthd: Thank you for your comment.  I prefer to use psp.exe, not the default viewer.

FunkyBrown: Thank you for your comment.  This got me on the right track, and the designated file is now opening with the following command:
C:\Program Files\Paint Shop Pro\psp.exe "c:\Program Files\PopTray\image.jpg"

I can't give a perfect score to your answer because the first set of quotation marks were not placed correctly, but you helped me resolve the question.  Thanks!

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now