开发者

Windows batch script and privileges for working in HomePath

开发者 https://www.devze.com 2023-04-13 06:24 出处:网络
Funny thing, but I\'ve been working w开发者_StackOverflowith bash, etc but never with Windows\' batch scripting.

Funny thing, but I've been working w开发者_StackOverflowith bash, etc but never with Windows' batch scripting.

What I am trying to do is rename some directory in my HomePath. So I simply do:

cd %HOMEPATH%
ren dirName newDirName

And then I get:

Access denied.

Is it even possible in Windows XP / 7 ?

Thanks !


Are you sure that you're already on the correct drive? %HOMEPATH% only gives you the directory, not the drive.

I'd suggest trying:

%HOMEDRIVE%
cd %HOMEPATH%
ren dirName newDirName
0

精彩评论

暂无评论...
验证码 换一张
取 消