I have left the line in the code that removes (rm) commented, as I would prefer that you test this on a subject of your image in another folder to assure that it is selecting the correct files.
If you instead, do not want files created exactly at 9:30pm or exactly at 5am to be removed, then change 21 to 21 respectively. As written, it will process only the files created between 9:30pm and 5am inclusively, ignoring the rest whose creation time does not satisfy the time range. It will graphically prompt for a folder selection that contains your camera images. On error the error_message number the error_numberĭisplay dialog "Error: " & the error_number & ".Here is the first script that you would run manually from the Terminal without any arguments. Move aFile to folder ((creationDateMonthInt as string) & space & creationDateMonth & space & creationDateYear) of folder "2015" of folder "Classeur administratif" of folder "Finances et administration" of folder "Documents" of folder "username" of folder "Users" of startup disk Set newFileName to "Bill" & space & "-" & space & "Sanitas" & space & "-" & space & creationDateMonth & space & creationDateYear & "." & aFileExt Set creationDateYear to year of creationDate Set creationDateMonthInt to month of creationDate as integer Set creationDateMonthInt to "0" & (month of creationDate as integer) If month of creationDate as integer is less than 10 then Set creationDateMonth to month of creationDate as string Set creationDate to creation date of aFile my system is in french, so almost everything's in french too -) But when the file is saved directly to Downloads from the internet (I'm using Safari), the Folder Script doesn't activate and the file stays there. Is this an error of Folder Action? When I move the file manually say from Dekstop to Downloads, it works. Is there a way to do this?ģ.) Lastly, this has more to do with the action folder process itself sometimes a downloaded file into the "Downloads" folder which the Folder Action points to does not see the newly added file. I need to change the files name but not with "Today's date" but "Last month date".
This is where I stumble.Ģ.) Also, some bills come "late", which means, it's a bill for the month June but can only download it in July. How do I do that? Can a value do this or does it needs a script? Either-way, it must be able to recognize that it needs to move it to July 2015 this month, August 2015 next month, when I download the new bill by the end of August. The next step is to move it to the folder July 2015. When found, it changes its name to "Bill - Sanitas - July 2015.pdf" (I found the variable "today's date", so that works fine).
The Action Folder sees the PDF, scans it for the word "Sanitas" in its content.
When I download the bill PDF from Sanitas' website, it comes in an indescribable file name like "invoice-195809192.pdf" which makes no sense at all. I was able to manage the first part until the moving-folder-bit.ġ.) First problem: As a concrete example (see image below), the company is called "Sanitas". When I download a monthly online receipt, I would like Automator to scan its content (format is always PDF) and based on the information (like say the name of the company) to rename the file into: Bill - and move it to an already existing folder in my Documents which is structured as followed:
How to move a file into existing folders based on the current date which changes every month? Here's the deal: 2 tasks (move this, rename that, pause itunes, etc.), but now I need something a bit more tricky and hope there are some cracks out there who can help me out, as I have no idea how to do this and suspect it will need a value or some script to achieve.
I've been looking for a way to make my life easier, I have tons of little Automator scripts with max.