Re: [BATCH WORLD] for loop including hidden files
- On 1/09/2011 02:54, Marc Peterson wrote:
>>> Batch world group,Yep, precisely.
>>> Any ideas how to include hidden files in a for loop? Most commands
>>> DIR, etc.) exclude hidden files, obviously.
>>> I thought I was onto a workaround with something like this:
>>> for /f "tokens=2 delims=:" %%I in ('attrib *') do @echo %%I
>> Try this:
>> for /f "delims=" %%a in ('dir /b /a:-d ') do @echo %%a
> Oh, wow, I was really over-thinking it and missing the obvious.
> Still, though, I don't think I would have found that solution myself because
> I've never fully grasped the /a:-d type switches. I guess it means exclude
> _only_ directories while including all the other DIR attribute options (R,
> H, A,& S).
> Thanks!Your welcome.