in reply to Network File read not working if invoked externally

Most likely this is either an issue because the current directory is not what you think it is, or a permissions issue because the external program runs as a Windows service which usually does not have the permissions to access network devices.

As you have not shown an SSCCE, it is quite hard to give you more concrete advice than to output all data as your program progresses to a log file and then compare the log files between a manual run and a run from the External program.

  • Comment on Re: Network File read not working if invoked externally

Replies are listed 'Best First'.
Re^2: Network File read not working if invoked externally
by SriniK (Beadle) on Jan 05, 2017 at 09:42 UTC
    Thanks for replying. I have attached the sample code here.

      If that is real, tested code, can you please explain what it is supposed to do:

      @wslfiles[0]='\\\\XXXXXXX\\f\$\\apps\\webapps\\auth.wsl'; my @wsl = @{$_[0]}; foreach $filename(@wsl)

      If that was not real code that raises the error, then please post short, real code that raises the error (after removing the server name etc.).

      From the error message, does the file mentioned in the error message exist?

      dir \\XXXXXXX\f$\apps\webapps\auth.wsl