Walk a directory/Non-recursively: Difference between revisions
Content added Content deleted
Simple9371 (talk | contribs) |
Simple9371 (talk | contribs) (→{{header|Batch File}}: Added syntax highlight) |
||
Line 97: | Line 97: | ||
=={{header|Batch File}}== |
=={{header|Batch File}}== |
||
A simple command that displays all EXE files in System32 directory non-recursively. |
A simple command that displays all EXE files in System32 directory non-recursively. |
||
<lang> |
<lang dos>dir /b "%windir%\system32\*.exe"</lang> |
||
The same command inside FOR loop: |
The same command inside FOR loop: |
||
*Inside a Batch File: |
*Inside a Batch File: |
||
<lang>@for /F "tokens=*" %%F in ('dir /b "%windir%\system32\*.exe"') do echo %%F</lang> |
<lang dos>@for /F "tokens=*" %%F in ('dir /b "%windir%\system32\*.exe"') do echo %%F</lang> |
||
*Command-line: |
*Command-line: |
||
<lang>for /F "tokens=*" %F in ('dir /b "%windir%\system32\*.exe"') do echo %F</lang> |
<lang dos>for /F "tokens=*" %F in ('dir /b "%windir%\system32\*.exe"') do echo %F</lang> |
||
=={{header|BBC BASIC}}== |
=={{header|BBC BASIC}}== |