1. Sivaprakash BKR
  2. PowerBuilder
  3. Tuesday, 25 June 2024 06:16 AM UTC

Hello

Using PB 2022 R3 build 3356

I need to open a file ( pdf, jpg) from a network drive, which has NOT been mapped as a local drive.   The file is selected by the end-user, whose path and name is obtained from GetFileOpenName command.   The returned path is in the form of

\\computername\e\somefolder\somefile.pdf  

Or

\\computername\e\somefolder=somefile.jpg

I try to open this file using

wb_1.navigate('file:///' + ls_path)

which return 'File Not Found error' in the webbrowser.

However if the user select a file from the local drive, it works fine.   It also works fine, if the network drive is mapped as a local drive and then select the file from the mapped drive.  

It failed to open the file, only if the file name (path) starts with //.

Should there be another way to open a file from a network drive.  

Is there anyway to open that file?

Happiness Always
BKR Sivaprakash

 

Andreas Mykonios Accepted Answer Pending Moderation
  1. Tuesday, 25 June 2024 09:23 AM UTC
  2. PowerBuilder
  3. # 1

Hi.

Don't know if this would work but try with:

wb_1.navigate('file://///' + ls_path)

Andreas.

Comment
  1. Sivaprakash BKR
  2. Tuesday, 25 June 2024 12:03 PM UTC
Thanks Andreas,

wb_1.navigate('file:' + ls_path) is working.
  1. Helpful 2
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.