How can I reload variables in Batch?

December 11, 2010 at 10:45:51
Specs: Windows 7, 2048
I have been using batch recently and have made a small little program that uses variables heavily.
I have gotten the file to save a variable called %USER% to a .dat file using this code:
set /p user=
echo %user%>user.dat

Is there a way I could get the file to reload this variable using the .dat file?

See More: How can I reload variables in Batch?

Report •

December 11, 2010 at 11:27:12
If the only thing contained in the file is "user", then you can simply use:

SET /p user=<FileName.dat

Can I put a question here?

Report •
Related Solutions

Ask Question