r/applescript • u/encodedworld • Oct 03 '22
Move file into folder of same name
I have a folder called Movies. Inside there are files
movie1.mp4
movie2.mp4
movie3.mp4
I want each file to be placed inside a folder of the same name (without the extension).
The end result would be a folder named Movies with 3 folders
movie1
movie2
movie3
And in each of the folder would be the respective movie#.mp4 file
4
Upvotes
View all comments
Show parent comment
2
u/chrismo80 Oct 09 '22 edited Oct 09 '22
What would be the proper way to get the name of a file without extension?All solutions I have found were always based on string searches, either by using dots as offset detection or name extension of but they are all not proper in my opinion, especiialy if dots or the extension is part of the filename string itself.
Would it be something like this?