Sign in with
Sign up | Sign in
Your question

Rename file with user's username

Last response: in Windows XP
November 14, 2011 4:50:29 PM

I would like to rename a file based on the user's username. As in renaming the file test.txt to jsmith.txt were the user's username is jsmith.

I would like to create a batch file that can be run from the user's computer and change the filename based on %username%

November 14, 2011 9:49:06 PM

What have you tried already? The task seems simple, but knowing what your problem is will help you get a good answer.
November 15, 2011 6:54:48 PM

Thanks for the response.
I have tried rename test.txt %username%.txt
Not sure what else to try.
Related resources

Best solution

November 15, 2011 8:39:56 PM

Try using the uppercase %USERNAME%.
November 23, 2011 1:56:49 PM

Best answer selected by tootsgeek.