From what I read, you actually are almost there. It looks like your problem may be how the folders are done (as in, locally or on the server).
As you said in your answer, you copy the emails to local folders, so therefore they would never be on your phone. And with iCloud's limited rules (in the cloud), as you note, you cant really make a sound or do much with them either.
As long as your Mac is always running (to run the rules), you really would only need to update your local mail rules to put the emails in the servers folders. This way if you are at your computer, you would hear the audio cues, as well as have the mail filtered. If you step away, as long as your Mac could still process the mail, it will copy the emails to the correct server folders, and be available.
On your Mac now, you should see two inboxes, iCloud and 'On My Mac'. Make sure folders exist under the iCloud account for where these messages should go. Then update your rules to point to the iCloud account folders, versus those on your mac.
The only thing you may see from this is some messages will be in your inbox for a very short period of time (before your Mac runs its rules), versus iClouds server side rules that process mail before its delivered.
You can do this in the terminal (shell). Open the terminal and type cd ~/Desktop
to change you current working directory to the Desktop.
Then for the different cases you listed:
mv *.PSD *.Ai *.INDD ~/Desktop/Workfiles
mv *.PNG *.JPG ~/Desktop/Pictures
mv *.doc *docx *.xls *.pdf ~/Desktop/Documents
mv file target
is the command to move files. You can move multiple files at once: mv file1 file2 file3 target
. The asterisk * is the so-called wild card character. So * stands for every character or character sequence. *.doc
would mean that it would affect all files that end with .doc
. You could also do it other way around, e.g., A*
to affect all files that start with A
.
If you want, you can copy the following lines into an empty text file and save it as example.sh
and add #!/bin/bash
to the first line. Make it executable by typing chmod ugo+x example.sh
. Then, you can use it every time you want to move your files from your desktop by typing ./example.sh
in the shell from your desktop.
So the suggested script contents would could look like this:
#!/bin/bash
cd ~/Desktop
mv *.PSD *.Ai *.INDD ~/Desktop/Workfiles
mv *.PNG *.JPG ~/Desktop/Pictures
mv *.doc *docx *.xls *.pdf ~/Desktop/Documents
As mentioned in the comments, you can save it as example.command
and use chmod ugo+x
to make it clickable and executable
Best Answer
The quickest way is to use
bash
andawk
syntax in your Terminal.appfor
statement introduces thebash loop
, to iterate through a set of data wherefile
is the variable.find
parses the/SOURCE/DIR
for that which is specified.|
acts as a pipe, passing stout fromfind
back to stdinawk
interprets stdin and prints only lines meeting the conditions specified by'NR %10 == 0’
NR
is anawk built-in variable
that specifies the record/line number to be evaluated.%
is anumerical operator
telling awk that the following character(s) must be treated as such.==
is relational operator formust be equal to..
0
is the binary expression forTRUE
So, that’s all fancy for "find every 10th file that exists in this directory and output it;
do
introduces the action to perform on the output.echo
is used to double check the command, the results of which will be printed to stout. If all looks well, remove it and perform the action (mv
,cp
)mv
is a built in bash command to take one file and move(or rename it).cp
is another built in bash command to mv one file from one dir. to another while preserving the original. You can directly substitutecp
formv
if you wish to preserve the contents of the original directory.$file
references thefile
variable that has now been defined.So, that’s all fancy for tell me what happens when I…(
echo
) “move
(or,copy
) all the files specified by the previous parameters to this other directory;”done
That’s all fancy for telling bash to terminate the loop since you’re done :)