An easy way to get rid of word 'tracks' in the tracklist file name
Is there a simple way to indicate that the ...tracks.txt file should be just .....txt? I looked at the options, but did not find anything there. Of course, I could tinker with the code, but I'd rather not do it with every new version released.
thanks in advance!
Running get_iplayer 3.20.0-MSWin32 from a Microsoft Windows 7 Home Premium (Version 6.1.7601) CMD shell.

Hi heyvalera,

The .tracks.txt and .credits.txt file extensions require the additional word to avoid file naming collisions. Probably the best way to change the downloaded .tracks.txt to just .txt would be to do so after successfully downloading the programme utilizing the --command option. For example, add the following to a download, or add it to a preset, or add it to your preferences (for Windows, but similar for other operating systems):
--command "ren \""<dir>\<fileprefix>.tracks.txt\"" \""<dir>\<fileprefix>.txt\"""
That won't work - wrong syntax for rename. Use this instead:
--command "rename \""<tracklist>"\" \""<fileprefix>.txt"\""
If you want to overwrite existing files, use move:
--command "move /y \""<tracklist>"\" \""<dir>\<fileprefix>.txt"\""
thank you VERY much for your suggestion! It all makes sense - to automate renames afterwards. Thanks again!
(17-03-2019, 05:27 PM)dinky Wrote: That won't work - wrong syntax for rename.

Yeah, how embarrassing, apologies to all.

It just occurred to me yesterday that the example I gave wouldn't work. And even with the correct escapes of the double quotes, the <dir>\ in the second argument to ren is superfluous. I'd also forgotten about the <tracklist> substitution parameter.

(The example I gave is wrong, but it would happen to work when adding it to preferences or a preset, go figure!)

So, coming back here to correct my error I find dinky's got it all sorted out and corrected for me. Thanks.

Before any similar postings in the future, I'll run a couple of quick tests—I usually do, but thought this one was simple and didn't require it, sorry.

Possibly Related Threads…
Thread Author Replies Views Last Post
  WebPVR: How to exclude common single word programme names? MrArtist 3 3,411 22-01-2017, 01:23 AM
Last Post: dinky