Using az sort with If then
Posted: 29 Apr 2022, 12:31
I've been playing around with the naming schemes for renaming my movies.
Came across the {az} which is handy for getting the first letter of the title but i'm trying to work out how can I encorporate if statements, to move the movies into folders, based off the file structure below.
Essentially, if the movie starts with a numeric no of 0-9 then put in the 0-9 folder. If {az} is between A-E then put it inside that folder, then the correct single letter folder below.
I could make it easier and just use the straight az and move all the A to Z folders up to the root directory, but i'd still need an if statement / naming to sort out the movies starting with 0-9. This is the main bit i'm stuck with.
Any assistance would be apprciated. Thanks.
├───0-9
├───A-E
│ ├───A
│ ├───B
│ ├───C
│ ├───D
│ └───E
├───F-J
│ ├───F
│ ├───G
│ ├───H
│ ├───I
│ └───J
├───K-O
│ ├───K
│ ├───L
│ ├───M
│ ├───N
│ └───O
├───P-T
│ ├───P
│ ├───Q
│ ├───R
│ ├───S
│ └───T
│
└───U-Z
├───U
├───V
├───W
├───X
├───Y
└───Z
Came across the {az} which is handy for getting the first letter of the title but i'm trying to work out how can I encorporate if statements, to move the movies into folders, based off the file structure below.
Essentially, if the movie starts with a numeric no of 0-9 then put in the 0-9 folder. If {az} is between A-E then put it inside that folder, then the correct single letter folder below.
I could make it easier and just use the straight az and move all the A to Z folders up to the root directory, but i'd still need an if statement / naming to sort out the movies starting with 0-9. This is the main bit i'm stuck with.
Any assistance would be apprciated. Thanks.
├───0-9
├───A-E
│ ├───A
│ ├───B
│ ├───C
│ ├───D
│ └───E
├───F-J
│ ├───F
│ ├───G
│ ├───H
│ ├───I
│ └───J
├───K-O
│ ├───K
│ ├───L
│ ├───M
│ ├───N
│ └───O
├───P-T
│ ├───P
│ ├───Q
│ ├───R
│ ├───S
│ └───T
│
└───U-Z
├───U
├───V
├───W
├───X
├───Y
└───Z