I have been trying to make a batch file using another batch file.
The file I want to make needs to contain %username%
in order for it to be functional in other computers as well.
Whenever I try to do it it types my actual username in the file which makes it impossible to run on other computers. Can someone please help me with my problem?
Here is what I wrote in the batch file:
Echo cd c:\Users\%username%\Documents > x.bat
But when I open x.bat it says:
Echo cd c:\Users\myname\Documents
I actually know what causes this problem but I couldn't find any way to get past it.
No comments:
Post a Comment