Chris Lopez
asked on
Fix Error Of Duplicate Folders When Renaming Folders
script I use
I had this question after viewing Remove last few characters of a folder name.
Okay I found this script does what I want but the Issue I have is that with folders that will end up with the same name I wish to Merge them and if their is content inside these folders that are the same than its OK overwrite them aswell.
So Say
Folder 1
--dog.txt
--cat.mp4
--pool.jpg
folder 2
--cat.mp4
--honey.mp4
--car.mp4
so the merge result will be
folder
--dog.txt
--cat.mp4
--pool.jpg
--honey.mp4
--car.mp4
I am on windows 10 if that matters.
@echo off
setlocal enabledelayedexpansion
pushd "c:\temp"
for /D %%F in (*) do (
set fn=%%~nF
ren "%%~F" "!fn:~0,-4!
)
I had this question after viewing Remove last few characters of a folder name.
Okay I found this script does what I want but the Issue I have is that with folders that will end up with the same name I wish to Merge them and if their is content inside these folders that are the same than its OK overwrite them aswell.
So Say
Folder 1
--dog.txt
--cat.mp4
--pool.jpg
folder 2
--cat.mp4
--honey.mp4
--car.mp4
so the merge result will be
folder
--dog.txt
--cat.mp4
--pool.jpg
--honey.mp4
--car.mp4
I am on windows 10 if that matters.
Are there just files under each folder you are processing, or could there be subfolders as well?
~bp
~bp
ASKER
NVIT,
That didnt seems to work
-
BP,
It will just be file's in the folders no sub directories.
That didnt seems to work
-
BP,
It will just be file's in the folders no sub directories.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
- Open a CMD window
- Run the bat
- If it looks correct, remove the ECHO words to run it for real.
Open in new window