I have one script thats call filebot with the specific parameters
The Main purpose of this script is to move/rename subtitles from a dropbox folder to the correct location of the video file and rename this video file too.
For Series i include the path of the all series in the script.
Code: Select all
'#V ----------------------------------------------
With Series.Append(New CSerie)
.Name = "Vikings"
.Search = "Vikings"
.Path = PathSeries & "Vikings\season02\"
End with
Code: Select all
Private Function SubtitleSeries_Action_RenameFilesAndMove()
Dim FileBotFormat
Set WshShell = CreateObject("Wscript.Shell")
FilebotFormat = "{n.upperInitial().space('.')}.{s00e00}.{t.space('.')}.{source}-{group}{if (lang.toString()=='por')'.pt'}{if (lang.toString()=='eng')'.en'}"
Aux_DeleteTempFiles(Path)
Aux_SendNotification "SubSerie - " & FileName, FileName & " added to " & Path
WshShell.Run [b]FilebotPath & " -rename " & chr(34) & Fullpath & FileName & chr(34) & " --db TheTVDB --format " & chr(34) & FilebotFormat & chr(34) & " --lang en --action move -non-strict --conflict override --output " & chr(34) & Path & chr(34[/b]),7,TRUE
Aux_DeleteTempFiles(Path)
WScript.sleep 10000
WshShell.Run [b]FilebotPath & " -rename " & chr(34) & Replace(Path,"\","\\") & chr(34) & " --db TheTVDB --format " & chr(34) & FilebotFormat & chr(34) & " --lang en --action move -non-strict --conflict fail[/b]",7,TRUE
Aux_DeleteTempFiles(Path)
Aux_RefreshPlex(19)
End Function
The process is like this:
Sickbeard snatch the file to uTorrent and when downloaded put it on the correct location. for example (Vikings\Season02\.....)
After this when i stop the torrent, in uTorrent, the script runs and rename all files in that folder.
(This because i have the path where the uTorrent saved the episode)
When i have subtitles, i put the subtitle, remotely, on a dropbox folder, and this part of script is called to
1) Move the subtitle to Path
2) Rename everything on that Path (again)
But now i try to do something like this to Movies, but i dont have the Path of the movie so to move the subtitle file i used
Code: Select all
Private Function SubtitleMovies_Action_RenameFilesAndMove()
Dim FileBotFormat
Set WshShell = CreateObject("Wscript.Shell")
FilebotFormat = PathMoviesHD & "/{n.upperInitial()} ({y})/{n.upperInitial().space('.')}.{y}.{vf}.{source}.{vc}.{ac}.{group}{if (lang.toString()=='por')'.pt'}{if (lang.toString()=='eng')'.en'}"
Aux_SendNotification "SubMovie - " & FileName, FileName & " added to " & PathMoviesHD
WshShell.Run FilebotPath & " -rename " & chr(34) & Fullpath & FileName & chr(34) & " --db TheMovieDB --format " & chr(34) & FilebotFormat & chr(34) & " --lang en --action move -non-strict --conflict override --output " & chr(34) & PathMoviesHD & chr(34),7,TRUE
....
End Function
But after this i dont know how to rename all files on that folder because, i dont know which folder is created.
Can someone help how i can solve this?
This also is need to optimize the current script, and put all in one, without to have the paths for all series in the script.
Thanks.