Get name of parent folder of parent folder of file
Re: [Noob] How do I do this?
Based on what I told you last time, you should know this already:
Code: Select all
f.dir.dir.name
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
How about f[2]?
Re: Get name of parent folder of parent folder of file
Sure, but counting path elements from the left is probably not a good idea if you ever add an additional folder level.
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
I used file.dir.dir.name and got new directories created. How do i put the file in the same folder it came from? John
Re: Get name of parent folder of parent folder of file
Your format should create a path like this "Avatar.avi" and not a path like this "/path/with/slashes/Avatar.avi" which will be resolved relative to wherever the file happens to be.
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
But they are all in seperate folder.
Say you have john,fred and sue in the folder c:\macgyver\seattle. And you want to use macgyver , episode 6. To put the renamed file into. But it makes a dir under the root for each file for each file. Is there anyway to put all them back into the dir they came from??? John
Say you have john,fred and sue in the folder c:\macgyver\seattle. And you want to use macgyver , episode 6. To put the renamed file into. But it makes a dir under the root for each file for each file. Is there anyway to put all them back into the dir they came from??? John
Re: Get name of parent folder of parent folder of file
If you want FileBot to move your files to C:/A/B.c then you just need to write a format that evaluates to C:/A/B.c that's all.
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
I dont want them to be moved!
Just use the folder name that they are in as part of the name.
Just use the folder name that they are in as part of the name.
Re: Get name of parent folder of parent folder of file
1. A filename:
2. A relative path:
Presumably, your format is generating paths and not filenames. The difference betweens paths and filenames is that paths contain slashes while filename don't contain slashes.
Code: Select all
filename.ext
Code: Select all
file/name.ext
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
What is the value of f.dir.dir.name?
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
The String "Season 6" will definitely not cause the creation of any folders.
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
So will f.dir.dir.dir.name?
Re: Get name of parent folder of parent folder of file
That depends on the value. If the value doesn't contain / or \ then no.
Look at the result:
If it's an absolute path it'll move files exactly as is:
If it's a relative path it'll move files relatively to where they are:
If it's a file name, it'll rename files relatively to where they are:
Look at the result:
If it's an absolute path it'll move files exactly as is:
Code: Select all
C:/a/b/c.mp4
Code: Select all
b/c.mp4
Code: Select all
c.mp4
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
The format does not do anything. The format produces a file path, and then files will be move/renamed according to that file path.
What is the file path that your format produces? How is that file path not what you want it to be?
What is the file path that your format produces? How is that file path not what you want it to be?
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
Y:/perry mason/1x19.mp4, John
Re: Get name of parent folder of parent folder of file
The format produces absolute paths . such as how to create a format call to use relative paths? Or the filename.ext ie: ? If it uses absolute paths!
John
Code: Select all
c:/diagnosis murder/season 1/ diagnosis:murder 1x3.mp4
Code: Select all
/diagnosis:murder/season 1/diagnosis:murder 1x3.mp4
Code: Select all
diagnosis:murder 1x3.mp4
John
Re: Get name of parent folder of parent folder of file
1.
If you want this path:
Then make your format expression only produce this path.
2.
Paths like this will work as expected:
If you don't know what . or .. means you will need to learn some basics first.
If you want this path:
Code: Select all
diagnosis:murder 1x3.mp4
2.
Paths like this will work as expected:
Code: Select all
./diagnosis:murder 1x3.mp4
Code: Select all
../diagnosis:murder 1x3.mp4
Please read the FAQ and How to Request Help.
Re: Get name of parent folder of parent folder of file
I know thatgoes up one directory andgoes up 2 , when I am in the editor of filebot do I put those in where the filename is such as ? Am I understanding you right? But if just want the season number
Code: Select all
..
Code: Select all
..\..
Code: Select all
../../diagnosis:murder 1x4.mp4
Code: Select all
..\..\[color=#0080FF]diagnosis:murder [/color]1x14.mp4
Re: Get name of parent folder of parent folder of file
Would it be easier to use Y:/Diagnosis Murder/season 1/Diagnosis Murder 1x3.mp4 [Airdate] f.dir.dir.name episode title? so it will copy it to that location?
Before I was trying to use the ../.. in the format string! John
Before I was trying to use the ../.. in the format string! John
Re: Get name of parent folder of parent folder of file
Please show code that shows how to copy the file to the right directory and use the new directory name for season #. So that it will be put into the right directory. Ok? John