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?
@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>nullists the content of the folder, and it redirects the command output to the null device.