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.
Win2000 and XP variable from a text file
Name: Alberto Levy Date: August 9, 2002 at 10:39:43 Pacific
Comment:
Dear friends, I´m having trouble assigning a env variable with a line from a text file. Does anyone could give me some light? I´d really appreciate. Thanks in advance, Alberto
Name: sancho Date: August 9, 2002 at 10:53:07 Pacific
Reply:
need to know which env variable.
You can write a batch file in notepad by just naming the file whatever.bat and including the lines to set the environment variable of your choice.
i.e.
@echo off *//will not display each line input set path = %path%;c:\example
this would add c:\example to your path statement.
0
Response Number 2
Name: Alberto Levy Date: August 9, 2002 at 10:57:49 Pacific
Reply:
Thank you Sancho. Let me try to explain better my problem. I´d like to read a text file that already exists and set up a variable, e.g. ALBERTO with the content of its first line. It{s a part of a bigger problem and it´s the missing part of it. Thank you once more, Alberto
0
Response Number 3
Name: Henny Sol Date: September 1, 2002 at 06:58:24 Pacific
Reply:
See the batchfile below: the user variables DATUM and TIJD will be set to parts of the first (and only) line of the %username% file:
echo off rem GETDATETIME
date /t>%USERNAME% for /F "tokens=2" %%i in (%USERNAME%) do ( echo %%i > %USERNAME% ) rem Set the char after delims to the DateSeperator (see ControlPanel) for /f "tokens=1,2,3 delims=/" %%i in (%USERNAME%) do ( set DATUM=%%i%%j%%k ) time /t>%USERNAME% for /F "tokens=1,2 delims=:" %%t in (%USERNAME%) do @set TIJD=%%t:%%u
Summary: I am trying to create a batch file that will read a text file full of computer names and the location of a license key for a program. So for example: WS123 C:\UN5.esu WS124 C:\UN6.esu Right now the fi...
Summary: I´m looking for a utility that can create multible users,passwords and home directories for the account from a text file. If you know of a utility that does this for active directories please let me ...
Summary: I have 2 sql queries which selects 2 different count values called Today_count and Total respectively. I need to display both values in this format in a text file. #Date,Time,Today_count,Total 01-FEB-...