FOLDER1
|___ REN.bat
It is possible to rename FOLDER1 by running REN.bat?
If yes, what is the command?
Thank you
Rename parent folder by child bat file [SOLVED]
Moderator: DosItHelp
Rename parent folder by child bat file [SOLVED]
Last edited by w64bit on 21 Aug 2021 10:13, edited 1 time in total.
Re: Rename parent folder by child bat file
First of all: NEVER name a batch file the same as a command!
As to your question: You'll get an access violation as long as the working directory is the folder to be renamed.
Steffen
As to your question: You'll get an access violation as long as the working directory is the folder to be renamed.
Code: Select all
@echo off &setlocal
pushd "c:\"
ren "%~dp0\." "FOLDER1"
popd
echo done
pause