Windows C盘文件夹路径用户名变量代替

前言全局说明

大部分人的用户名都不一样,但是经常需要访问不同用户名下的相同路径文件夹,每个路径改一遍非常浪费时间,所以用户名用变量代替


一、说明

1.1 环境:

Windows 11 家庭版 24H2 26100.4061

二、变量

变量名 变量值(默认值) 变量描述
%UserName% Administrator 用户名
%HomePath% \Users\Administrator 用户主路径
%UserProfile% C:\Users\Administrator 用户配置路径

三、操作演示

3.1 原始路径

C:\Users\admin\Pictures

3.2 用变量代替

C:\Users\%UserName%\Pictures



免责声明:本号所涉及内容仅供安全研究与教学使用,如出现其他风险,后果自负。




参考、来源:
https://blog.csdn.net/u013430110/article/details/103797776
https://blog.csdn.net/woshiqiji828/article/details/145866586



posted @ 2025-08-15 16:24  悟透  阅读(75)  评论(0)    收藏  举报