Choices for fastest directory move

Started by Luuk2005, November 10, 2020, 01:31:48 AM

Previous topic - Next topic

Luuk2005

Greetings to the experts. This for https://www.bulkrenameutility.co.uk/forum/viewtopic.php?f=12&t=5228 
SGirard likes to move all files inside the folders named 'Unclassified' upwards one directory like...

c:\Export\Client1\Correspondance\Unclassified\Filename2.msg ----> c:\Export\Client1\Correspondance\Filename2.msg
c:\Export\Client1\Correspondance\SpecificName\Filename1.msg --> (stay same folder)
c:\Export\Client2\Tax\unclassified\Working paper.xls -----------------> c:\Export\Client2\Tax\Working paper.xls
c:\Export\Client2\Tax\SpecificName\taxreturn1.pdf -------------------> (stay same folder)

If its for me, Im just use..
exiftool -q -q -ext * -r -fast4 -Directory"<${Directory;s/(.*\/)(?i)Unclassified$/$1/}"  c:/Export

But for beginners to have preview with easy edits, Im testing...
exiftool -q -q -ext * -r -fast4                                                              -TESTname"<${Directory;s/(.*\/)(?i)Unclassified$/$1/}/%f.%e" .
exiftool -q -q -ext * -r -fast4 -if "$Directory=~/\/(?i)Unclassified$$/" -TESTname"<${Directory;s/(.*\/)(?i)Unclassified$/$1/}/%f.%e" .

Is there benefits to adding -if "Expression" when the ${Directory;changes} is already good enough?
At first Im thinking -if gives better speed, so ${Directory;changes} not always needs to conduct, but then -if "Expression" must always conduct.


Its unfortunate there is not -TESTdirectory option, so Im also testing...
exiftool -q -q -ext * -r -fast4                                                              -TESTname"<${Directory;s/(.*\/)(?i)Unclassified$/$1/}" .
exiftool -q -q -ext * -r -fast4 -if "$Directory=~/\/(?i)Unclassified$$/" -TESTname"<${Directory;s/(.*\/)(?i)Unclassified$/$1/}" .

With no %f or %e and nothing added in ${Directory;s//here/}or-here, the exiftool seems smart to know you only want to change path??
If following these rules, its always to be safe? But maybe slower because exiftool must fix the missing text?

Im thinking its better/safer to always use %f.%e formats to get the previews, but wonder if other way is to be safe.
Also, any other advice is to be appreciated. Many thanks in advance!
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7

Luuk2005

After many experiments on the command line, Im learned the fastest way is not using exiftool for this. Its because in every test, the 'move' command always conducted much faster, even when exiftool uses the -r option. So instead its just to be a simple batch (that also deletes the empty 'unclassified' folders after moving the files).
Windows8.1-64bit,  exiftool-v12.92(standalone),  sed-v4.0.7