Walk a directory/Recursively: Difference between revisions

Content added Content deleted
m (batch file migration)
m (reordering after lang rename)
Line 83:
out .= A_LoopFileName "`n"
MsgBox,% out</lang>
 
=={{header|Batch File}}==
<lang dos>dir /a-d %1</lang>
 
If you wanted to apply some command to each item in a directory tree, then use <code>/R</code> on a <code>FOR</code>. For example, apply the ECHO command to every DLL file in C:\Windows\System32:
 
<lang dos>FOR /R C:\Windows\System32 %F IN (*.DLL) DO ECHO "%F"</lang>
 
=={{header|C}}==
Line 234 ⟶ 241:
listdir(path, &matchNPrint) ;
}</lang>
 
=={{header|Batch File}}==
<lang dos>dir /a-d %1</lang>
 
If you wanted to apply some command to each item in a directory tree, then use <code>/R</code> on a <code>FOR</code>. For example, apply the ECHO command to every DLL file in C:\Windows\System32:
 
<lang dos>FOR /R C:\Windows\System32 %F IN (*.DLL) DO ECHO "%F"</lang>
 
=={{header|E}}==