Page 2 of 2
Re: Rename folders without touching original files
Posted: 18 Apr 2013, 20:36
by andreyy
I tried to implement this logic to the script but haven't succeed. Could you pleas integrate this excerpt to the script? Thank you once again!!
Re: Rename folders without touching original files
Posted: 19 Apr 2013, 08:05
by rednoah
Yeah, should be getRenameLog() not getRenameMap() ...
Here you go:
http://pastebin.com/caKW5h3F
Re: Rename folders without touching original files
Posted: 20 Apr 2013, 07:10
by andreyy
Readnoah, thank you as always! Is it possible to make ln -s or ln instead of copying the rest of the files.
I mean is it possible to change this line to include linking files, not copying:
Code: Select all
_guarded{ f.copyTo(new File("D:/path/to/remainder")) }
Re: Rename folders without touching original files
Posted: 20 Apr 2013, 07:14
by rednoah
Replace:
Code: Select all
f.copyTo(new File("D:/path/to/remainder"))
With:
Code: Select all
execute('ln', '-s', f, "D:/path/to/remainder/${f.name}")
Re: Rename folders without touching original files
Posted: 20 Apr 2013, 08:31
by andreyy
Ufff, thanks!
The another problem I found is that hard link ln is not working for directories. It's impossible to set hard link to a directory.
So the scripts for LN without -s option is not working for some of the cases. When source is a disk directory itself. It looks like the directories must be created at the target first
The sad thing is all I try to do - is to make my Synology NAS and NFS client work with a plain folder of movies. I think it's quite often task.
Re: Rename folders without touching original files
Posted: 23 Apr 2013, 18:25
by andreyy
Sorry for disturbing you once again. I'm wondering if it possible to solve the problem with the directories that are not created by the hard LN?
Re: Rename folders without touching original files
Posted: 24 Apr 2013, 03:24
by rednoah
That's technology issue.
With symlinks it works, but then NFS resolves symlinks client-side, and not server-side. Try something like FTP/SFTP/WebDAV/Samba instead.
Hardlinks on folders are not allowed on most filesystems because of the obvious issues with infinite recursion.
But why do you have folders anyway? Don't use folders, just pack disks into .iso images. FileBot prefers to work on files, but if you have organized things neatly already, and there is a movie.nfo file, then it'll take the folder, if you don't want that just delete all the .nfo files and it'll go back to work on the video files only and ignore all the other stuff. Also you can modify the script to adjust this behaviour as you'd like.