我想编写一个函数,该函数是在另一个目录(共享驱动器)中使用另一个嵌入式命令 %recent% 执行“查找”命令。
下面是思路:
REM Take in log file name input eg. "result_10030" = %1 to search for all result_10030*.log = %1*.log
REM Use the following to list the files matching result_10030*.log
for /f "delims=" %%x in ('dir /d /od /b %1*.log') do set recent=%%x
echo %recent%
REM Use %recent% as the file to perform find
REM Take in %2 as share drive path
find "PASSED" %2%recent%
显然它不工作。
您的建议将不胜感激!:)