Walk a directory/Recursively: Difference between revisions
Content added Content deleted
m (reordering after lang rename) |
(→{{header|Batch File}}: works with) |
||
Line 89: | Line 89: | ||
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: |
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: |
||
{{works with|Windows NT|4 or later (includes Windows XP and onward)}} |
|||
<lang dos>FOR /R C:\Windows\System32 %F IN (*.DLL) DO ECHO "%F"</lang> |
<lang dos>FOR /R C:\Windows\System32 %F IN (*.DLL) DO ECHO "%F"</lang> |
||