Computing.Net > Forums > Programming > make param = dir /b /s

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

make param = dir /b /s

Reply to Message Icon

Name: bulleke
Date: April 8, 2005 at 14:48:50 Pacific
OS: Windows XP
CPU/Ram: 128 MB
Comment:

I found this script
---------------
Set Param=chocolat
echo %Param:c=g% > list.txt
---------------
this give
---------------
ghogolat

Now I want to change all the "C:\Documents and Settings\TheBrian\" into "\" of "dir /b /s"
The only problem is "Set Param=" I don't know what to put there the rest I know



Sponsored Link
Ads by Google

Response Number 1
Name: dtech10
Date: April 9, 2005 at 13:56:02 Pacific
Reply:

Hi Bull
Not sure what you want here, but do you mean to set a environment variable to "dir /s /b".


0

Response Number 2
Name: bulleke
Date: April 9, 2005 at 14:27:13 Pacific
Reply:

If I write "dir /b /s" than you must know that you et a list of files
Now I want that "Set Param=the list of files" so that I can change the whole list in one time


0

Response Number 3
Name: dtech10
Date: April 10, 2005 at 06:43:10 Pacific
Reply:

Hi
How big is the list, you'll maybe run out of environment space.
Whats wrong by typing "dir/s /b > Filename.txt" and editing that.


0

Response Number 4
Name: bulleke
Date: April 10, 2005 at 12:20:27 Pacific
Reply:

I'm making a bunch of categories (about 30) and I have to update them at least one a week (almost every day)


0

Response Number 5
Name: uli_glueck
Date: April 11, 2005 at 05:26:24 Pacific
Reply:


If I understand right, you need something like this:

FOR /f %%a in ('dir/b/s') do (
Set Param==%%a
echo %Param:c==g% >> list.txt
)


I am working with NT, so I am not sure if this is working with XP


uli


0

Related Posts

See More



Sponsored Link
Ads by Google
Reply to Message Icon

Display filename only wit... put text between 2 lines



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: make param = dir /b /s

set output of dir /b as variables www.computing.net/answers/programming/set-output-of-dir-b-as-variables/18106.html

Batch: file search, get dir, copy www.computing.net/answers/programming/batch-file-search-get-dir-copy/13762.html

rename files and folder to lowercase with b www.computing.net/answers/programming/rename-files-and-folder-to-lowercase-with-b/19161.html