{Help req} Renaming existing directories

Support for Windows users
Post Reply
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

{Help req} Renaming existing directories

Post by Horak »

Hey guys, I followed an example script I found and it doesn't work for me. I am using Windows and I would like to rename all my TV directories to the naming standard in TheTVDB so when I run the AMC script it will always hit the correct directory. This is what I ran:

Code: Select all

filebot -script fn:renall --action test "./" --log-file amc.log -non-strict --db TheTVDB --def target=folder
This is the result:

Code: Select all

Rename episodes using [TheTVDB]
CmdlineException: No media files: [G:\TV\Wheel of Fortune]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [G:\TV\Who Wants To Be a Millionaire]
Rename episodes using [TheTVDB]
CmdlineException: No media files: [G:\TV\Workaholics]
If I remove the --def target=folder it will rename the episodes in the subdirectory just fine but that isn't what I want. I even tried to do it in the GUI with CTRL-Shift-Drop of the folders in the rename window but a query on anything but TheMovieDB yields no query in the right hand pane.

Is this a bug?
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

Re: {Help req} Renaming existing directories

Post by Horak »

Ok I might have further info that may or may not be related, if I use the amc script I get this error for multiple directories but it works perfectly if I feed it a single directory:

Code: Select all

G:\TV>filebot -script fn:amc --action test -non-strict "./" --log-file amc.log --def unsorted=y clean=y "seriesFormat=G:/TV/{n}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`'`'?]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}"
Java HotSpot(TM) Client VM warning: TieredCompilation is disabled in this release.
Locking C:\Users\User1\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Sun Apr 10 01:12:27 BOT 2016]
Parameter: unsorted = y
Parameter: clean = y
Parameter: seriesFormat = G:/TV/{n}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`┬┤ΓÇÿΓÇÖ?]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}'.'+lang}
Argument: G:\TV
SevenZipNativeInitializationException: Failed to load 7z-JBinding: C:\Program Files\FileBot\7-Zip-JBinding.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {Help req} Renaming existing directories

Post by rednoah »

1.
A series folder (Alias) is not an episode (Alias 1x01) so it can't work. If you have an episode folder (Alias 1x01) then it'll be processed as if it was a file. This mode is generally only useful for movies where each folder corresponds to a movie (Avatar 2009).

2.
You cannot recycle directory entries.

3.
You can organize files into a new file structure and then delete the old one, which is what you actually want.

4.
Do not use 32-bit Java on 64-bit machines. Read the FAQ.

Code: Select all

SevenZipNativeInitializationException: Failed to load 7z-JBinding: C:\Program Files\FileBot\7-Zip-JBinding.dll: Can't load AMD 64-bit .dll on a IA 32-bit platform
:idea: Please read the FAQ and How to Request Help.
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

Re: {Help req} Renaming existing directories

Post by Horak »

Ok I understand 1, 2 & 4 but how to do 3 after I solve the version issue?
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {Help req} Renaming existing directories

Post by rednoah »

1. Process C:/Folder A with format C:/Folder B/<your format>
2. Now C:/Folder A is empty and C:/Folder B contains your files organized exactly as per your spec
3. Delete Folder A
:idea: Please read the FAQ and How to Request Help.
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

Re: {Help req} Renaming existing directories

Post by Horak »

Process it with what script or command? I tried using the AMC script but it got stuck after 1 large directory and wouldn't proceed so I just started doing it with the GUI by hand.

Code: Select all

Run script [fn:amc] at [Sun Apr 10 11:27:06 BOT 2016]
Parameter: unsorted = y
Parameter: clean = y
Parameter: seriesFormat = G:/TV2/{n}/{n} - {episode.special ? 'S00E'+special.pad(2) : s00e00} - {t.replaceAll(/[`´‘’?]/, /'/).replaceAll(/[!?.]+$/).replacePart(', Part $1')}{'.'+lang}
Argument: G:\TV
Read archive [subs.ro.7z] and extract to [G:\TV\Smallville\Cover\subs.ro\Cover]
Extracting files [G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E01.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E01.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E02.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E02.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E03.720p.HDTV.X264-DIMENSION.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E03.HDTV.XviD-LOL.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E04.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E04.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E05.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E05.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E06.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E06.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E07.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E07.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E08.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E08.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E09.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E09.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E10.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E10.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E11.720p.HDTV.x264-CTU.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E11.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E12.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E12.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E13.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E13.PROPER.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E14.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E14.HDTV.XviD-ASAP.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E15.720p.HDTV.x264-ORENJI.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E15.HDTV.XviD-P0W4.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E16.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E16.HDTV.XviD-ASAP.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E17.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E17.REPACK.HDTV.XviD-ASAP.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E18.720p.HDTV.x264-IMMERSE.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E18.HDTV.XviD-ASAP.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E19.720p.HDTV.x264-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E19.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E20.720p.HDTV.x264-ORENJI.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E20.HDTV.XviD-2HD.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E21-E22.720p.HDTV.x264-ORENJI.srt, G:\TV\Smallville\Cover\subs.ro\Cover\Smallville.S10E21-E22.HDTV.XviD-2HD.srt]
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {Help req} Renaming existing directories

Post by rednoah »

1.
The amc script doesn't get stuck. But the initial auto-detection step might take a while if you have thousands of files, especially if those files are not well organized or on network drives.

If extracting a few kilobytes of subtitles takes forever, then this is indeed strange. There's probably something wrong with the archive.


2.
You can also do it with the GUI. Same rules. Just change to format and organize files into a new structure. The GUI will ignore archives so it won't get stuck on archives. Keep in mind that you're re-organizing media files. Random clutter files that happen to be in these folders may not be imported into the new structure.
:idea: Please read the FAQ and How to Request Help.
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

Re: {Help req} Renaming existing directories

Post by Horak »

Thanks, didn't get it to work on the cli so I spent about 10 hours doing it in the GUI by hand. Is there a way to seek out the non video/subs and delete them without moving the files?
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {Help req} Renaming existing directories

Post by rednoah »

Well, you just processed all the video/subtitle files right? So now that the media files have been moved into a new folder structure, you can just delete the old folder (which now only contains the old non-video/subtitle files) and you're done.
:idea: Please read the FAQ and How to Request Help.
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

Re: {Help req} Renaming existing directories

Post by Horak »

No I did it in place, so what I want to do now is remove the .nfo .txt etc. I your cleaner script and it worked for the samples and rar files but I now want to blacklist certain file types and it doesn't seem to work, I've tried .nfo .jpg nfo jpg *.jpg ?.jpg /jpg \jpg and it will never catch any of those extensions and I have a lot of those file type in the directories.

Code: Select all

C:\Users\blah>filebot -script fn:cleaner --action test F:/Movies/ --def exts=JPG
Done ?(?????)?
User avatar
rednoah
The Source
Posts: 23002
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: {Help req} Renaming existing directories

Post by rednoah »

Read the docs:
http://www.filebot.net/forums/viewtopic ... &t=5#p1341

If you pass in exts, then you will override exts, not add additional extensions. So in this case it won't touch any folders where there is any non-JPG files.

If you just want to delete all JPG files, you don't need the cleaner script which has lots of checks and balances.

e.g.
http://stackoverflow.com/a/13139787/1514467
:idea: Please read the FAQ and How to Request Help.
Horak
Posts: 11
Joined: 09 Apr 2016, 20:50

Re: {Help req} Renaming existing directories

Post by Horak »

Thanks for your help, I sent a donation.
Post Reply