我正在尝试从网络驱动器上的C#代码调用Get-childitem
来检索xml文件,但它无法正常工作。代码不返回文件也不抛出异常。
string FileSelectionCommand = "Get-ChildItem " + "\\Btapp-prod\\e$\\BizTalkMessages\\Proudction\\" + "*.xml -rec | Where-Object { $_.CreationTime -ge " + "\"" + searchdate + "\"" + "}";
shell.Commands.AddScript(FileSelectionCommand);
// Execute the script
var fileresults = shell.Invoke();