且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将命令的输出设置为变量

更新时间:2023-11-30 21:32:46

FOR /F "delims=" %i IN ('forfiles /P "D:\files" /S /D -10  ^| find /c /v ""') DO set today=%i

在这种情况下,您需要对管道进行转义.

in this case you need to escape the pipe.