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
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
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
Summary: The problem is that you want to use a variable inside a loop. This requires delayed expansion. To enable delayed expansion, you have to use the SETLOCAL command. Unfortunately, that has an unwanted si...
Summary: Hello all I'm trying to put together a batch file that will help update specific files in multiple computers. Specifically, I want the batch file to do these things: (0) (The batch file UPDATE.BAT wil...
Summary: simple requirement and above script without indention makes it hard to read, and some variable isn't utilized throughout the script after lots of if-else checking, eg. DIRCMD @echo off & setlocal enab...