开发者

Understanding dir %%a 1>nul 2>nul in batch file

Got this batch file which does exactly what I want, however I don't fully understand what its coding is doing can somebody run me through it?

开发者_JS百科@echo off
for /F %%a in ('mountvol ^| find ":\"') do (
dir %%a 1>nul 2>nul
if not ErrorLevel 1 (
del /s /f %%ahuntthisfile.txt
del /s /f %%aandthisfiletoo.txt
)
)

particularly the dir %%a 1>nul 2>nul has got me stuck.


I think that dir %%a 1>nul 2>nul lists the content of the folder, and it redirects the command output to the null device.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜