Renaming problem

Trev

The Dumb One
I seem to be getting a lot of " ERROR Target already exists" errors in auto.log. It is to do with renaming files/titles./ Here is an extract from the log
Code:
2062    15/12/2015 20:05:11 -   DECRYPT: /media/My Video/EastEnders 15-12-15 1928
2061    15/12/2015 20:00:55 - autotrigger[3692]: Renaming /media/My Video/EastEnders_20151215_1928.ts to EastEnders 15-12-15 1928
2060    15/12/2015 04:26:51 - ... ERROR Target already exists
2059    15/12/2015 04:26:51 - Renaming /media/My Video/Fake Britain/Fake Britain 14-12-15 1929.ts to Fake Britain 14-12-15 1929
2058    15/12/2015 04:26:51 - Renaming /media/My Video/Fake Britain/Fake Britain_20151214_1929.ts to Fake Britain 14-12-15 1929
2057    15/12/2015 04:26:45 - Done... 1.21 GiB in 100.799 seconds - 12.27 MiB/s
2056    15/12/2015 04:26:44 -   Removing/binning old copy.
2055    15/12/2015 04:25:04 -   DLNA: http://127.0.0.1:9000/web/media/5182.TS
2054    15/12/2015 04:25:04 -   DECRYPT: /media/My Video/Fake Britain/Fake Britain_20151214_1929
2053    13/12/2015 22:05:15 - ... ERROR Target already exists
2052    13/12/2015 22:05:15 - Renaming /media/My Video/The Hunt/The Hunt 06-12-15 2101.ts to The Hunt 06-12-15 2101
2051    13/12/2015 22:05:14 - ... ERROR Target already exists
2050    13/12/2015 22:05:14 - Renaming /media/My Video/The Hunt/The Hunt 22-11-15 2101.ts to The Hunt 22-11-15 2101
2049    13/12/2015 22:05:14 - ... ERROR Target already exists
2048    13/12/2015 22:05:14 - Renaming /media/My Video/The Hunt/The Hunt 15-11-15 2102.ts to The Hunt 15-11-15 2102
2047    13/12/2015 22:05:14 - ... ERROR Target already exists
2046    13/12/2015 22:05:14 - Renaming /media/My Video/The Hunt/The Hunt 29-11-15 2100.ts to The Hunt 29-11-15 2100
2045    13/12/2015 22:05:14 - ... ERROR Target already exists
2044    13/12/2015 22:05:14 - Renaming /media/My Video/The Hunt/The Hunt 13-12-15 2100.ts to The Hunt 13-12-15 2100
2043    13/12/2015 22:05:14 - ... ERROR Target already exists
2042    13/12/2015 22:05:14 - Renaming /media/My Video/The Hunt/The Hunt 06-12-15 2101.ts to The Hunt 06-12-15 2101
2041    13/12/2015 22:05:13 - ... ERROR Target already exists
2040    13/12/2015 22:05:13 - Renaming /media/My Video/The Hunt/The Hunt 22-11-15 2101.ts to The Hunt 22-11-15 2101
2039    13/12/2015 22:05:13 - ... ERROR Target already exists
2038    13/12/2015 22:05:13 - Renaming /media/My Video/The Hunt/The Hunt 15-11-15 2102.ts to The Hunt 15-11-15 2102
2037    13/12/2015 22:05:13 - ... ERROR Target already exists
2036    13/12/2015 22:05:13 - Renaming /media/My Video/The Hunt/The Hunt 29-11-15 2100.ts to The Hunt 29-11-15 2100
2035    13/12/2015 22:05:12 - Renaming /media/My Video/The Hunt/The Hunt_20151213_2100.ts to The Hunt 13-12-15 2100
2034    13/12/2015 22:04:23 - autotrigger[6451]: Done... 2.8 GiB in 257.821 seconds - 11.13 MiB/s
2033    13/12/2015 22:04:22 - autotrigger[6451]:   Removing/binning old copy.
2032    13/12/2015 22:00:05 - autotrigger[6451]:   DLNA: http://192.168.0.11:9000/web/media/3798.TS
2031    13/12/2015 22:00:05 - autotrigger[6451]:   DECRYPT: /media/My Video/The Hunt/The Hunt_20151213_2100
2030    13/12/2015 21:06:34 - autotrigger[4577]: Renaming /media/My Video/Britain's Wildest Weather 2015_20151213_1930.ts to Britain's Wildest Weather 2015 13-12-15 1930
2029    13/12/2015 21:06:32 - autotrigger[4577]: Done... 3.94 GiB in 378.144 seconds - 10.66 MiB/s
2028    13/12/2015 21:06:31 - autotrigger[4577]:   Removing/binning old copy.
2027    13/12/2015 21:00:14 - autotrigger[4577]:   DLNA: http://127.0.0.1:9000/web/media/5175.TS
2026    13/12/2015 21:00:14 - autotrigger[4577]:   DECRYPT: /media/My Video/Britain's Wildest Weather 2015_20151213_1930
2025    12/12/2015 20:32:20 - ... ERROR Target already exists
2024    12/12/2015 20:32:20 - Renaming /media/My Video/The World's Weirdest Weather/The World's Weirdest Weather 05-12-15 2000.ts to The World's Weirdest Weather 05-12-15 2000
2023    12/12/2015 20:32:20 - ... ERROR Target already exists
2022    12/12/2015 20:32:20 - Renaming /media/My Video/The World's Weirdest Weather/The World's Weirdest Weather 12-12-15 1859.ts to The World's Weirdest Weather 12-12-15 1859
2021    12/12/2015 20:32:19 - ... ERROR Target already exists
2020    12/12/2015 20:32:19 - Renaming /media/My Video/The World's Weirdest Weather/The World's Weirdest Weather 05-12-15 2000.ts to The World's Weirdest Weather 05-12-15 2000
2019    12/12/2015 20:32:19 - Renaming /media/My Video/The World's Weirdest Weather/The World's Weirdest Weather_20151212_1859.ts to The World's Weirdest Weather 12-12-15 1859
2018    12/12/2015 20:32:17 - Renaming /media/My Video/The Chase_ Celebrity Special/The Chase_ Celebrity Special 12-12-15 1858.ts to The Chase  Celebrity Special 12-12-15 1858
2017    12/12/2015 20:32:17 - Renaming /media/My Video/The Chase_ Celebrity Special/The Chase_ Celebrity Special_20151212_1858.ts to The Chase_ Celebrity Special 12-12-15 1858
2016    12/12/2015 20:32:16 - Renaming /media/My Video/The Chase_ Celebrity Special/New_ The Chase_ Celebrity Special_20151212_1858.ts to The Chase_ Celebrity Special_20151212_1858
2015    12/12/2015 20:32:16 - Setting title for /media/My Video/The Chase_ Celebrity Special/New_ The Chase_ Celebrity Special_20151212_1858.ts to The Chase: Celebrity Special
2014    12/12/2015 20:32:09 - Done... 2.38 GiB in 221.342 seconds - 11 MiB/s
2013    12/12/2015 20:32:08 -   Removing/binning old copy.
2012    12/12/2015 20:28:27 -   DLNA: http://192.168.0.11:9000/web/media/3798.TS
2011    12/12/2015 20:28:27 -   DECRYPT: /media/My Video/The World's Weirdest Weather/The World's Weirdest Weather_20151212_1859
It's obviously something in my sweeper rules, but I can't see what's wrong. Will someone please have a look and tell be the error of my ways, to be punishes by 100 lashes and a public stoning.
Code:
# Remove Title New: prefix
global title New: action {settitle {%orig%replace,New: ,,}}
# Remove Filename New: prefix
global filename New_ action {renamefile {%orig%replace,New_ ,,}}
# File Datestamp DD MMM YY
global filename *20[0-9][0-9][0-9][0-9][0-9][0-9]_* action {renamefile {%title %2digitdate-%2digitmonth-%2digityear %hhmm}}
# Remove "_" in Filename
global filename _ action {renamefile {%orig%replace,_, ,}}
 
It's your third rule: it's trying to process files that it has already processed, so the resulting rename is to the same thing, but the OS takes this as an attempt to write a file with the same name as an existing file.
 
Well, that's what I had assumed but omitted commenting to that effect:oops:, but why is it trying to reprocess and why doesn't it try to reprocess rules 2 and 4 and raise a duplicate filename error for each?
If the file has already been processed, surely it won't meet the condition "*20[0-9][0-9][0-9][0-9][0-9][0-9]_*" and why does it not error on every file? And why does it appear to only error once on each file?
 
That was my thought too, but the pattern of the renamed file doesn't seem to match.
 
Looking at the top debug lines, 2058 is obviously rule 3, 2059 (& hence 2060) must be rule 4.
It looks like "global filename _" is (sometimes) matching when it shouldn't, then obviously the replace has nothing to change; hence the error.
 
Last edited:
Back
Top