Command line for Mspaint

Solved
Hello everyone,
for an application, I would like to open a *.jpg file using a command line: run the program with a variable that is the name of the file to open.
Can you help me?

Thanks a lot in advance

Configuration: Windows 7 / Firefox 3.6.16

1 answer

  • Votes
  • Date
  • Descending date
  1. My image is located at: c:\test.jpg

    In MS-Dos:

    C:\Documents and Settings\toto>mspaint c:\test.jpg

    Otherwise, what language do you need to do this with?
    1. Not completely resolved: with a simple name, it works. But with a file name such as First Name Last Name.jpg, there is an error message "file not found". It is in a relatively old Paradox database management. Thank you in advance for your response.
    2. Apparently, there's nothing we can do. It's natively in MsPaint that probably manages poorly the access to files with a spaced name.

      So for "Nom Prénom.jpg" use instead: Nom_Prenom.jpg while avoiding special characters and accented characters.
    3. Indeed! I will write something to concatenate the name and it should work. Thank you for your response.