中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-04 06:48
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » How to use a variable for the current username
Printable Version  641 / 3
Floor1 eech Posted 2007-04-18 03:39
高级用户 Posts 346 Credits 906
For example, use %SystemRoot% to represent the current C:\windows

Then how do you represent the current username?

I want to copy cc.exe to
C:\Documents and Settings\xx\SendTo

If I don't know what this XX username is, how should I write it?
Floor2 zh159 Posted 2007-04-18 04:07
金牌会员 Posts 1,467 Credits 3,687
Floor3 htysm Posted 2007-04-18 04:23
高级用户 Posts 415 Credits 866
Or "C:\Documents and Settings\%username%\SendTo"
Floor4 zh159 Posted 2007-04-18 04:24
金牌会员 Posts 1,467 Credits 3,687
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023