Folder Move - SKIP If Folder Exists In Destination
Moderators: Hacker, petermad, Stefan2, white
Folder Move - SKIP If Folder Exists In Destination
I want Total Commander to SKIP a folder move operation if the destination already has a folder with the same name. AB Commander can do this - can TC do this (or can this be added as a recommendation)?
- ghisler(Author)
- Site Admin
- Posts: 50865
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I'm sorry, this isn't currently possible. When a folder already exists, TC just copies data to it, like almost all other file managers including the Explorer. What would be the use of such a function?
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com
This is a HUGE issue for me - every month I have upwards of 500 folders that need to be migrated to another hard drive. I can't afford to have the contents of one folder to be merged into another folder (or worse, for two identically named folders to overwrite data within the destination folder from the second folder.
This seems very easy to me - if a list of folders is tagged within TC to be moved to another folder, if the folder already exists and TC has been configured to skip the move process (and move to the next folder in the queue automatically with no prompting) then NOTHING is moved; TC simply moves on to the next folder tagged to be moved - and I can more closely examine the two folders to decide what should be done INSTEAD of files being overwritten or a sub folder written to the destination....
This seems very easy to me - if a list of folders is tagged within TC to be moved to another folder, if the folder already exists and TC has been configured to skip the move process (and move to the next folder in the queue automatically with no prompting) then NOTHING is moved; TC simply moves on to the next folder tagged to be moved - and I can more closely examine the two folders to decide what should be done INSTEAD of files being overwritten or a sub folder written to the destination....
I understand that it is important for you but it is absolutely non-standard behaviour. BTW, it may be achieved using simple batch file:
Jsut drag file onto buttonbar and add parameters:
(here may be some problems if your temp folder path contains spaces - it is a bug in for command)
For using open in target panel destination folder and select folders to copy in source panel - and click a button!
Code: Select all
@echo off
if -%1==- goto help
if -%1==-GO goto go
title U-Folders Mover
echo Source Path: %2
echo Target Path: %3
echo.
for /f "delims=" %%d in (%1) do call %0 GO %2 %3 %%d
echo.
pause
goto exit2
:go
if exist %3%4 echo Skipping %4 since %3%4 exists
if exist %3%4 goto exit
echo Moving %4 to %3...
move %2%4\. %3
goto exit
:help
echo Start this file from TC buttonbar or user-command.
echo Use following Parameters string: %%F %%P %%T
echo.
pause
:exit2
cls
:exit
Code: Select all
%F %P %T
For using open in target panel destination folder and select folders to copy in source panel - and click a button!
Well, it seems that you need to enclose path with spaces into quotes. Here right line of this file:
(I just added pair of double quotes)
Also I discovered that move command doesn't work between different partitions so we need to use xcopy here. Modified batch (on move error moves using copy and delete instead of just moving top folder - but delete is skipped if copy failed):
And, please use following parameters:(works right if source or target path contains spaces)
Code: Select all
for /f "delims=" %%d in (%1) do call %0 GO %2 %3 "%%d"
Also I discovered that move command doesn't work between different partitions so we need to use xcopy here. Modified batch (on move error moves using copy and delete instead of just moving top folder - but delete is skipped if copy failed):
Code: Select all
@echo off
if -%3==- goto help
if -%1==-GO goto go
title U-Folders Mover
echo Source Path: %2
echo Target Path: %3
echo.
for /f "delims=" %%d in (%1) do call %0 GO %2 %3 "%%d"
echo.
pause
goto exit2
:go
if exist %3%4 echo Skipping %4 (target exists)
if exist %3%4 goto exit
echo Moving %4 to %3...
move %2%4\. %3 2>nul
if not errorlevel 1 goto exit
xcopy /y /e %2%4\. %3%4>nul
if not errorlevel 1 rd /s /q %2%4\.
goto exit
:help
echo Start this file from TC buttonbar or user-command.
echo Use following Parameters string: %%F "%%P" "%%T"
echo.
pause
:exit2
cls
:exit
Code: Select all
%F "%P" "%T"