我们有一些c#代码:
RunProcessAndWaitForExit("cmd.exe", $"/C dir {pstrDriveLetter}:\ /al /s > {pstrDriveLetter}:\junctions.log");
用更简单的话说就是:
dir C: /al /s > D:junctions.log
在某些情况下失败:
2022-05-22 08:08:52 INFORMATION "Exception generated when running junction logger: cmd.exe finished with exit code = 1: Error: ERR: File Not Found
Out:
我真的很困惑,因为这可能是什么:
我不认为它是在重定向到一个不存在的文件,因为使用:
失败了C:repostherepo [fix-dj-delete-snapshots ≡]> cmd.exe /c dir C: /al /s > B:test.log
Out-File: Cannot find drive. A drive with the name 'B' does not exist.
这个错误是什么意思?我该怎么修理它?
好吧,我认为这只是意味着它没有找到连接点!