how can i rename my current folder?

February 28, 2014 at 22:25:25
Specs: Windows XP
i want to rename my current folder (folder that i am in it) is it possible?
with this script i can find my folder name but i cant rename it

for %%* in (.) do @echo %%~n*
pause
ren "%%~n*" "new"

whats wrong?

if its possible i want to remove any www.*.com from current folder name and replace it with space


See More: how can i rename my current folder?

Report •


#1
March 1, 2014 at 03:55:04
You can't rename a folder while you are actually in it, just as you can't rename a folder that's open in Windows.

You need to come out of it and rename it from it's parent folder or from root of drive, whichever applies.

message edited by phil22


Report •

#2
March 1, 2014 at 06:25:41
::====== script starts here ===============
::
:: mioo.bat 2014-03-01 20:58:32.62
@echo off & setLocal enableDELAYedeXpansioN

set old=!CD!
cd ..
ren !old! new
::====== script ends here =================

=====================
M2 Golden-Triangle


Report •

#3
March 1, 2014 at 06:26:42
well if its not possible to do this please write a batch script for me to do it
1- find current folder's name
2-if there is any www. ???* .com in its name rename it(replace www. ???* .com )with space
thanks

Report •

Related Solutions

#4
March 1, 2014 at 06:30:04
dear Mechanix2Go
program should find current folder name automatically
if there is any www in its name replace it with space
please read above post

message edited by mioo_sara


Report •

Ask Question