Horje
how to get list folder in cmd to value Code Example
how to get list folder in cmd to value
@echo off
setlocal disableDelayedExpansion
set "files=."
for /r %%F in (*) do (
  setlocal enableDelayedExpansion
  for /f "delims=" %%A in ("!files!") do (
    endlocal
    set "files=%%A "%%F"
  )
)
(set files=%files:~2%)
how to get list folder in cmd to value
for /f "eol=: delims=" %%F in ('dir /b /o:n') do set /p =""%%F","
how to get list folder in cmd to value
@echo off
setlocal disableDelayedExpansion
:: Load the file path "array"
for /f "tokens=1* delims=:" %%A in ('dir /s /b^|findstr /n "^"') do (
  set "file.%%A=%%B"
  set "file.count=%%A"
)

:: Access the values
setlocal enableDelayedExpansion
for /l %%N in (1 1 %file.count%) do echo !file.%%N!




Shell

Related
npm installl chalk Code Example npm installl chalk Code Example
git workflow Code Example git workflow Code Example
bash search history Code Example bash search history Code Example
jest for react Code Example jest for react Code Example
find command in linux Code Example find command in linux Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
8