Batch file : skipping folders starting with _ in FOR loop
问题 I would like to exclude all profiles starting with _ without having to list each profile in an exclusion text file. Is it possible to do this ? @echo off set Target=D:\backup for /f "tokens=*" %%I in ('dir /a:d-h /b "%SystemDrive%\Users\*"') do if exist "%Target%\%%~nXI\" ( ........ ) pause exit Thank you very much in advance for helping ! 回答1: The following code example provides a methodology for retrieving the profile names you require, (those which are not a special account and whose names