Error using Directory.GetFiles to access files on a NAS

  • Thread starter Thread starter Philippe91
  • Start date Start date
P

Philippe91

Guest
Hello,

First, pls excuse my limited knowledge of this here:

I am facing an issue when trying to access a list of files on a NAS using Directory.GetFiles from an application triggered as a planned task.

Basically, I mapped the NAS directory as Y:\Backups\PC1\Disk backups and used it as follows:

sPath= "Y:\Backups\PC1\Disk backups"

Dim files as string() = Directory.GetFiles(sPath,"*.bkp")

When I execute it as a planned task, I get an error like "Unable to locate part of the path" although the path really exists.

I also tried to run it as \\BACKUPNAS\Backups\PC1\Disk backups with no more luck.

Can anyone let me know what happens there and if there is a solution to my (probable) mistake?

Thank you all and best regards

Philippe

Continue reading...
 
Back
Top