Move files to a new folder

Vampyrebe

Registered
Hello all,

First I'd like to apologize for asking something maybe stupid to you guys, but I have two excuses ;)

First one, is that I have a new mac since a week. The second one, is that i'm a switcher after 25 years experiencing Windows... So this is all new to me...

It seems I encounter a problem executing my very first Automator Script... Maybe I could use some lights here to help me getting the work done...

Here is the problem :

I have files that I'd like to be sorted automatically. For that purpose, I thought of having a folder, and when a file is drag and dropped on that folder, it will trigger the script. A dialog would ask the user what name to use, the user write it in, and the script goes on. It creates under that very same directory a sub-directory, named after the user input, and move the file to that folder. And that's almost it. (I would like to have a renaming of the file as well, but one problem at a time).

So, I started to work with Automator, and after much researches, and trials, it seems I almost have it working properly... I have my folder created as a sub-directory, named after user's input, but the file is not moved to that specific folder. It remains under the mother directory (the one I dropped the file). And the finder starts again by itself, as there is a file in its folder... So, I think i'm not far from it, but I need some lights here...

For debugging purposes, here is what I told in the actions of Automator :

- Ask for text (here I ask the user to name the new folder who will receive the file)
- Obtain variable value (I created a variable called title, in which I receive the data)
- New folder (I passed the variable as name, and I set the mother directory. The aim here is to get the directory created under the mother directory. It seems it do the job very well now)

And from here, it starts to become hectic :
- Define variable's value (I created a second variable which will receive the path where the new folder has been created)
- Obtain selected items from the finder (to get the file I put in the folder)
- Move items of the finder (to move the file into its new sub-directory. I set here the place where to save the file with the second variable).

And that's it... But it seems it isn't quite working very well...

Could you help me solve the problem ?

Thank you very much for helping,

Vampyrebe
 
Back
Top