Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,25 @@
|
|||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
:: Without storing the output of the command, it can be viewed by inputting the command
|
||||
dir
|
||||
|
||||
|
||||
:: Storing the output of 'dir' as "line[]" containing the respective lines of output (starting at line[1])
|
||||
:: Note: This method removes any empty lines from the output
|
||||
set tempcount=0
|
||||
for /f "tokens=*" %%i in ('dir') do (
|
||||
set /a tempcount+=1
|
||||
set "line!tempcount!=%%i"
|
||||
)
|
||||
:: The array would be viewed like this
|
||||
for /l %%i in (1,1,%tempcount%) do echo !line%%i!
|
||||
|
||||
|
||||
:: Storing the output of 'dir' in a file, then outputting the contents of the file to the screen
|
||||
:: NOTE: rewrites any file named "out.temp" in the current directory
|
||||
dir>out.temp
|
||||
type out.temp
|
||||
del out.temp
|
||||
|
||||
pause>nul
|
||||
Loading…
Add table
Add a link
Reference in a new issue