Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- setlocal EnableDelayedExpansion
- set file1=c:\windows\explorer.exe
- set file2=c:\windows\system32\ExplorerFrame.dll
- set file3=c:\windows\system32\shell32.dll
- set file4=c:\windows\system32\timedate.cpl
- set file5=c:\windows\system32\wucltux.dll
- set file6=c:\windows\system32\comdlg32.dll
- set file7=c:\windows\system32\appwiz.cpl
- set file8=
- set file9=
- :: initiate var
- set count=7
- :: Skip crap
- GOTO CRAP
- :: count files and save to tempfile
- dir /b | find "." /c > %appdata%\tempfile.txt
- :: tempfile to var
- set /p count=<%appdata%\tempfile.txt
- :CRAP
- echo Debug: Count = %count%
- :: this batch files relies in the same dir as the files, substract 1
- set /a count=%count%-1
- echo Debug: Count (-1) = %count%
- echo Debug: Will loop %count% times
- echo.
- for /L %%i IN (1,1,%count%) DO (
- set var=file%%i
- call set _result=%%!var!%%
- echo file: !_result!
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement