Command line for Mspaint

Solved
oursgenial Posted messages 30 Status Member -  
oursgenial Posted messages 30 Status Member -
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

  1. informaticienSAP Posted messages 131 Status Member 20
     
    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?
    0
    1. oursgenial Posted messages 30 Status Member 9
       
      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.
      0
    2. informaticienSAP Posted messages 131 Status Member 20
       
      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.
      0
    3. oursgenial Posted messages 30 Status Member 9
       
      Indeed! I will write something to concatenate the name and it should work. Thank you for your response.
      0