Sheldon Lewis
Sheldon Lewis

Reputation: 35

.bat file to rename targeted folder for current user

Is it possible through Windows batch script to rename a specific folder for a user that is currently logged in?

I'm looking for renaming

C:\Users\current account name\AppData\Local\example name

to

example name.old

Upvotes: 1

Views: 997

Answers (1)

Richard
Richard

Reputation: 1131

Just use the LOCALAPPDATA environment variable:

ren "%LOCALAPPDATA%\example name" "xample name.old"

Upvotes: 2

Related Questions