diff --git a/source/net/sourceforge/filebot/cli/ArgumentBean.java b/source/net/sourceforge/filebot/cli/ArgumentBean.java index 75082123..782e8f30 100644 --- a/source/net/sourceforge/filebot/cli/ArgumentBean.java +++ b/source/net/sourceforge/filebot/cli/ArgumentBean.java @@ -31,7 +31,7 @@ public class ArgumentBean { @Option(name = "--order", usage = "Episode order", metaVar = "[Airdate, Absolute, DVD]") public String order = "Airdate"; - @Option(name = "--action", usage = "Rename action", metaVar = "[move, copy, symlink, test]") + @Option(name = "--action", usage = "Rename action", metaVar = "[move, copy, keeplink, symlink, hardlink, test]") public String action = "move"; @Option(name = "--format", usage = "Episode naming scheme", metaVar = "expression") diff --git a/source/net/sourceforge/filebot/cli/StandardRenameAction.java b/source/net/sourceforge/filebot/cli/StandardRenameAction.java index d53a5912..3725e488 100644 --- a/source/net/sourceforge/filebot/cli/StandardRenameAction.java +++ b/source/net/sourceforge/filebot/cli/StandardRenameAction.java @@ -26,6 +26,24 @@ public enum StandardRenameAction implements RenameAction { } }, + KEEPLINK { + + @Override + public File rename(File from, File to) throws Exception { + File destionation = FileUtilities.resolveDestination(from, to); + + // move file and the create a symlink to the new location via NIO.2 + try { + java.nio.file.Files.move(from.toPath(), destionation.toPath()); + java.nio.file.Files.createSymbolicLink(from.toPath(), destionation.toPath()); + } catch (LinkageError e) { + throw new Exception("Unsupported Operation: move, createSymbolicLink"); + } + + return destionation; + } + }, + SYMLINK { @Override diff --git a/website/cli.html b/website/cli.html index aa08fea9..8329ae46 100644 --- a/website/cli.html +++ b/website/cli.html @@ -173,7 +173,7 @@
Checksum mode: sfv, md5, sha1 | +Rename mode: output folder |
Subtitle mode: srt (re-encode subtitles) | |
Checksum mode: sfv, md5, sha1 | +
{n.space('_')}_-_{e.pad(2)}_[{resolution}_{vc}_{ac}][{crc32}]
Juuni_Kokuki_-_01_[1280x720_XviD_MP3][3E16AF40]
- {n.space('.')}.{'s'+s.pad(2)}e{e.pad(2)}.{t.space('.')}.{vf}.{vc.lower()}.{ac.lower()}
Firefly.s01e01.Serenity.720p.x264.ac3
+ {n.space('.')}.{'s'+s.pad(2)}e{e.pad(2)}.{t.space('.')}.{vf}.{vc}.{ac}
Firefly.s01e01.Serenity.720p.x264.ac3
{n} [{airdate.format('yyyy.MM.dd')}] {t}
The Daily Show [2010.01.05] George Lucas