Hi All,

Request your help, I have samll program which validates the file path, the script run perfectly when i run it manually, but if i run it via windows task scheduler i am getting "Invalid File Path <Path> or Path do not Exist", The path is a windows share, Even tried to add the net path as "\\\\server\\share$\\BACKUP" for the parameter "p" in the below code but no luck, the same error.

Even tried to call this program via .bat script not luck same error

Windows .BAT program
@echo off
cd D:\DScript
start /D D:\DScript /B /WAIT D:\DScript\TestDir.exe
exit

Program
import std.stdio;
import std.file;
import std.path;
import std.system;

void main()
{
 version (Windows) {
 auto p = "N:\\\BACKUP";
if (!p.isValidPath && !p.strip.isValidFilename || !p.exists ) { writeln("Invalid File Path (", p, ") or Path do not Exist"); }
  else { writeln("File Exist":, p); }
}
  }

From,
Vino.B

Reply via email to