Copy link to clipboard
Copied
please give me the solution
how to open file from one location in script
c.pfaffenbichler wrote:
Maybe
app.open(File(/*insert the correct path as a string here*/))
Use / not \ in the path for example "~/My Documents/My Pictures/IMG_5597.CR2"
You can also prompt for a file
var dir = Folder("~/My Documents/My Pictures"); // Root Folder for Images
//Prompt for background
NewImage = dir.openDlg("Select an Image" , "Select:*.nef;*.cr2;*.crw;*.dcs;*.raf;*.arw;*.orf;*.dng;*.psd;*.tif;*.jpg;*.png;*.bmp");
if( NewImage != undefined){
open(File(NewImage))
code
}
Copy link to clipboard
Copied
Maybe
app.open(File(/*insert the correct path as a string here*/))
Copy link to clipboard
Copied
c.pfaffenbichler wrote:
Maybe
app.open(File(/*insert the correct path as a string here*/))
Use / not \ in the path for example "~/My Documents/My Pictures/IMG_5597.CR2"
You can also prompt for a file
var dir = Folder("~/My Documents/My Pictures"); // Root Folder for Images
//Prompt for background
NewImage = dir.openDlg("Select an Image" , "Select:*.nef;*.cr2;*.crw;*.dcs;*.raf;*.arw;*.orf;*.dng;*.psd;*.tif;*.jpg;*.png;*.bmp");
if( NewImage != undefined){
open(File(NewImage))
code
}
Copy link to clipboard
Copied
JJ, thats a commented out string… and not any path notation…
Copy link to clipboard
Copied
Yes that is a comment /* coment */
I was making a note the when you replace that comment the user should use a forward slash in path not backward slash that is all.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now