how to rename
Moderator: DosItHelp
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
how to rename
how to rename all of files with the name "aaaa" in Hard drive "D" to "ssss"?
Re: how to rename
There is nothing like a Hard drive "D", never heard of it sorry.Mohammad_Dos wrote:how to rename all of files with the name "aaaa" in Hard drive "D" to "ssss"?
If however you like to rename all files on drive 'D:' named 'aaaa' to 'ssss' u can use
Code: Select all
@echo off
for /d /r %%? in (
"aaaa"
) do echo.ren "%%~?" "ssss"
pause
exit
-
- Posts: 84
- Joined: 08 Sep 2010 10:25
- Location: Iran,Kashan
- Contact:
Re: how to rename
it does not work!
Re: how to rename
'
Sorry, my mistake
Sorry, my mistake
Code: Select all
@echo off
for /r %%? in (
aaaa
) do if exist "%%~dp?%%~nx?" (
echo.ren "%%~dp?%%~nx?" "ssss"
)
pause
exit
Code: Select all
ren "..\aaaa" "ssss"
ren "..\Nieuwe map\aaaa" "ssss"
Druk op een toets om door te gaan. . .
Re: how to rename
Mohammad_Dos wrote:it does not work!
You could try debugging it yourself or attempting to write the code yourself instead of people giving you the fish like they have for the past two years.
I just have to ask. Are you putting all of this code you are given onto your website. I looked at your website and translated the main page and see you have several tutorials on creating batch files. If you are doing that, are you giving credit to the people here who have been helping you with the code and linking back to the webpage as a source of your articles.