Page 2 of 2

Re: Synchronize Dirs: Option to ignore extension

Posted: 2020-04-12, 15:48 UTC
by JardaSX
Total Commander uses checksums (hashes) for file comparison, if you pictures don't match there's no point in making such comparison. You need specific software to compare pictures depending on how much different they can be.

Re: Synchronize Dirs: Option to ignore extension

Posted: 2020-04-17, 17:46 UTC
by NotNull
If I understand correctly (*), the "good" files are in the CLEAN file structure, leaving the "bad" files with the same name, but different extension, in the DIRTY file structure.
Now you want to have a synchronization for these files in a way that you can see and delete the "bad" files in the DIRTY folder(structure).

If so: this CMD script should be able to do that:
Change the settings to match your situation. For example: *.ini should be *.jpg
(It doesn't actually delete these files, but show you what would be deleted)

Code: Select all

@echo off
setlocal enabledelayedexpansion

::__________________________________________________________________________
::
::				SETTINGS
::__________________________________________________________________________
::
	set "CLEAN=C:\temp"
	set "DIRTY=T:\temp"
	set "CLEANPATTERN=*.ini"


::__________________________________________________________________________
::
::				ACTION!
::__________________________________________________________________________
::

	for /f "usebackq delims=" %%x in (`dir /b /a-d /s "%CLEAN%\%CLEANPATTERN%" 2^>nul`) do (
		set DIRTYPATTERN=%%~dpnx
 		set DIRTYPATTERN=!DIRTYPATTERN:%CLEAN%=%DIRTY%!.*"
		echo CLEAN: "%%x"
		echo DEL    "!DIRTYPATTERN!"
		echo.===============================================
	)


arko wrote: 2020-04-06, 12:52 UTC Yeah, and filename is just a non-resident attribute in MFT...
... on local NTFS filesystems. Not over SMB.
(and the filename is a resident attribute under normal circumstances. Not a non-resident one. )



(*) Your description is not very clear ..