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.
Batch %variables%
Name: HIT Date: December 10, 2004 at 14:35:46 Pacific OS: XP Pro CPU/Ram: AMD64 / 768DDR
Comment:
Hi
I'm just messing about with batch files and wondered if anyone knew where i could get a list of pre-set variables from. For example %date% and %computername% are pre-set and can just be added to the batch file (after echo of course) and it displays the info.
If anyone knows where i can get a list of these pre-sets i would appreciate it.
Summary: You can use the FOR cmd to process the filename, passing each line to a certain variable (like %%A), removing surrounding quotes: for /F "delims=" %%A in (FILENAME.EXT) do echo PATH=%%~A -- Leonardo P...
Summary: You mean getting the variable value and using it to name the file? ren whatever.wtv %variable* or, if the variable doesn't contain the extention: ren whatever.wtv %variable%.abc -- Secret_Doom -- secr...
Summary: I have a random generated number that is a variable(randname.exe), I have exported a registry file ( hkey.......computername="???") how can I get a batch to insert the random variable into the reg fil...