List folders as a variable

March 17, 2010 at 11:06:44
Specs: XP
I want to be able to look at the user profile folder capture the name of the folders and store that in a variable.

Would anyone be able to help me with the code to do so?

I've got this so far

cd C:\Documents and Settings
dir /b /on

As you can see thats very little lol!

See More: List folders as a variable

Report •

March 17, 2010 at 11:39:36
@echo off > newfile & setLocal enableDELAYedeXpansion
for /f "tokens=* delims= " %%a in ('dir/b/ad') do (
set V=!V!%%a

Helping others achieve escape felicity


Report •
Related Solutions

Ask Question