I have some video in separate folder in C:
WEST FOLDER, ANIMATION FOLDER and ANIME FOLDER
I make code to move that video from C: to G:
G:/BACKUP/DOWNLOAD/FILM/{n.replaceAll(/[:|]/, " - ")} ({y}) ({genres.take(2).join(' ')}) ({omdb.rating})/{n.replaceAll(/[:|]/, " - ")} ({y}) ({genres.take(2).join(' ')}) ({omdb.rating}){subt}
when I use that code, I hope it will make this:
G:/BACKUP/DOWNLOAD/FILM/WEST FOLDER
G:/BACKUP/DOWNLOAD/FILM/ANIMATION FOLDER
G:/BACKUP/DOWNLOAD/FILM/ANIME FOLDER
But all video just go to G:/BACKUP/DOWNLOAD/FILM/
-----------
So I try manually without filebot, move video to
G:/BACKUP/DOWNLOAD/FILM/WEST FOLDER
G:/BACKUP/DOWNLOAD/FILM/ANIMATION FOLDER
G:/BACKUP/DOWNLOAD/FILM/ANIME FOLDER
then I use this filebot code in every folder one by one
{n.replaceAll(/[:|]/, " - ")} ({y}) ({genres.take(2).join(' ')}) ({omdb.rating})/{n.replaceAll(/[:|]/, " - ")} ({y}) ({genres.take(2).join(' ')}) ({omdb.rating}){subt}
but all video just go to
G:/BACKUP/DOWNLOAD/
example
G:/BACKUP/DOWNLOAD/X-Men (2013) (Action) (8.8)
G:/BACKUP/DOWNLOAD/Finding Nemo (2011) (Action) (5.1)
G:/BACKUP/DOWNLOAD/Naruto (2010) (Action) (6.2)
----------
What is mistake in my code?
Thanks for your help.
How to rename and move files in separate folder
Re: How to rename and move files in separate folder
If you want your files to be moved into different folders based on some condition, then you need to express that condition in your format expression.
You seem to want to retain some information from the original path. I'd use file.path.match(...) for that:
FileBot will try to auto-detect the structure root if you use a relative path format. You can force FileBot to resolve relative formats against the current location though, just start your format with ./ or just use {folder} to reference the current folder.
You seem to want to retain some information from the original path. I'd use file.path.match(...) for that:
Code: Select all
{file.path.match(/WEST|ANIMATION|ANIME/)}
FileBot will try to auto-detect the structure root if you use a relative path format. You can force FileBot to resolve relative formats against the current location though, just start your format with ./ or just use {folder} to reference the current folder.
Please read the FAQ and How to Request Help.
-
- Posts: 4
- Joined: 25 Jan 2016, 11:07
Re: How to rename and move files in separate folder
thanks its work
{file.path.match(/WEST|ANIMATION|ANIME/)}
{file.path.match(/WEST|ANIMATION|ANIME/)}