Run Photoshop from PC Command Prompt - relative argument reference fails

Engaged ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

I'm having a problem running photoshop version: 22.3.0 from the command prompt using relative references.

 

Using absolute references to argument file works:

D:> "C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe" "D:/Pictures/Coaster/2011-10-14_0164.jpg"

 

Changing the directory to the folder with the argument file does not work:

D:\Pictures\Coaster>"C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe" "2011-10-14_0132.jpg"

 

I'm getting the error 'Could not open "2011-10-14_0132.jpg" because of a disk error'.

TOPICS
Bug, Problem or error, Windows

Views

169

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

I'm running Windows 10 which PS 2021 requires and have updated PS 22.3 to 22.3.1 and do not have the problem report.  Photoshop starts and opens the passed image.

Capture.jpg

 

 

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

Thanks for the reply.  Note I said this works as an absolute reference.

Try it as a relative reference and see if it still works.:

 

E:

CD "My files\Pictures\John

"C:\Program Files\Adove\Adobe Photoshop 2021\Photoshop.exe" "OldFart.jpg"

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

Something strange is going in this area.

while this 

E:

CD "My files\Pictures\John

"C:\Program Files\Adove\Adobe Photoshop 2021\Photoshop.exe" "OldFart.jpg"

does not work and we feel it should

the following  should not  work but does

E:

CD "My files\Pictures\John

"C:\Program Files\Adove\Adobe Photoshop 2021\Photoshop.exe" "E:\OldFart.jpg"

 

also strange we know works

C:

"C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe" "E:\My Files\Pictures\John\OldFart.jpg"

but 

C:

"C:\Program Files\Adobe\Adobe Photoshop 2021\Photoshop.exe" "C:\My Files\Pictures\John\OldFart.jpg"

did not work but should have

Photoshop loaded  but nothing opened in it it was just ready for work and  I could open OldFart

Capture.jpg

the young stud is  gone

image.png

 

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

Thanks for the testing.  Did you get the same error message as I posted?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Most Valuable Participant ,
Apr 18, 2021 Apr 18, 2021

Copy link to clipboard

Copied

As I wrote something strange is going on in this area. If the file Name I Passed was a jpeg file I wound up with your disk error message. If the File Name I passed was a RAW Image file I wound with a message the file was a  an unsupported file format, if  I passed the incorrect Path\File Name  Drive:\File Name  it worked because  the drive's current directory had been set to the correct path. Is the Problem in PS or is it in Windows or do both Adobe and Microsoft have  problems in their code?.

JJMack

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Engaged ,
Apr 19, 2021 Apr 19, 2021

Copy link to clipboard

Copied

LATEST

I think it must be Photoshop that has the problem.  The Windows code has been around since MSDOS and it works for all other applications that I have tried.  The reason I need to figure this out is I am trying to launch Photoshop from my application.  If I use the absolute path for the image then that is what apears in Photoshop when you invoke "Save as", and the image folder is not the default folder in the "Save as" dialog.  Hence the need to use a relative path and a working directory.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines