Batch file save file as current user name

May 9, 2011 at 12:57:03
Specs: Windows Vista
I currently am writing a batch file that saves the output of a computer scan as "urls.html" on my thumb drive. The problem is, I am using it on various users computers, and it saves as the same name every time, overwriting the previous scan. I need to save the output file with a unique name every time to avoid this. I would like the file to be saved as "current user name.html" Could anyone help me out with this?

See More: Batch file save file as current user name

Report •

May 9, 2011 at 13:22:15
Save the output as


Beware don't miss the double quotes around the filename since the username may contain blanks.

Report •

May 11, 2011 at 07:27:42
Worked like a charm. Thanks!

Report •

Related Solutions

Ask Question