FOR /R and hidden files

D

David Trimboli

FOR /R only seems to go through non-hidden files. Is there a way to
change this and have it go through all files?

David
Stardate 6471.7
 
F

foxidrive

FOR /R only seems to go through non-hidden files. Is there a way to
change this and have it go through all files?

use /f instead ala:

@echo off
for /f "delims=" %%a in ('dir /b /s /a:-d') do echo command "%%a"
 
D

David Trimboli

foxidrive said:
use /f instead ala:

@echo off
for /f "delims=" %%a in ('dir /b /s /a:-d') do echo command "%%a"

Thanks, foxidrive. For some reason I had been thinking of nesting FOR
commands, and it was getting messy.

David
Stardate 6474.2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top