• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Open network file

Engaged ,
Dec 03, 2021 Dec 03, 2021

Copy link to clipboard

Copied

From a script I try to open a file at my synology server

var aFile = File("\\myserver\files\myfile.pdf");
app.open(aFile);

I am getting

the specified file could not be opened because it could not be found

Any ideas why?

( The file is opened using a recorded action)

TOPICS
Scripting

Views

234

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

correct answers 1 Correct answer

Engaged , Dec 03, 2021 Dec 03, 2021

Hi,

your code is not working but point me to the correct direction!

I just change the backslashes from \\ to //

var aFile = File("//myserver/files/myfile.pdf");
app.open(aFile);
Thanks!

Votes

Translate

Translate
Adobe
Participant ,
Dec 03, 2021 Dec 03, 2021

Copy link to clipboard

Copied

try this code, just Change the path

 

var aFile = new File("S:/myserver/folder/nameFile.pdf");
app.open(aFile );

Votes

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 ,
Dec 03, 2021 Dec 03, 2021

Copy link to clipboard

Copied

LATEST

Hi,

your code is not working but point me to the correct direction!

I just change the backslashes from \\ to //

var aFile = File("//myserver/files/myfile.pdf");
app.open(aFile);
Thanks!

Votes

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