Help with creating Automator Folder Action
Hi
I want to create a folder action to empty my Caches from my both System and User Library files. I want a little help in creating the workflow. I tried to create a workflow, but the problem is it was asking for the system password when I selected the Library cache folder from my System. How can I create a workflow and save it as a plugin for my everyday action...
thanks in advance..
HI,
Not sure if Automator can do that but AppleScript might. Post here for help.
(Applications/Utilities)
http://discussions.apple.com/forum.jspa?forumID=724
Carolyn
Similar Messages
-
Help with iTunes & Finder Folder Action
My iTunes library has both a TON of albums and a TON of one-off mp3s such as remixes or singles. I'm trying to figure out a way to make two smart playlists and need help.
Playlist One is a smart playlist of 250 of the most recently added one-off tracks, compiled by looking for #single in my .mp3 comment fields.
Playlist Two is a smart playlist of the 25 last ALBUMS I added to iTunes, compiled by looking for #album in my .mp3 comment fields.
For Playlist One I'd like to use Automator and make a folder action to:
- Watch my 'Downloads' folder for downloaded .mp3 files.
- Add those .mp3 files to iTunes, letting iTunes copy to music folder.
- Delete the original file from the 'Downloads' folder.
- In iTunes, add '#single' to the Comment field of added .mp3.
For Playlist Two I'd like to use Automator and make a folder action to:
- Watch my 'Downloads' folder for downloaded .rar and .zip files.
- Open/Unzip those .rar and .zip files.
- Then look for SUBFOLDERS containing .mp3 files in my 'Downloads' folder.
- Add those .mp3 files to iTunes, letting iTunes copy to music folder.
- Delete the folder from the 'Downloads' folder.
- In iTunes, add '#album' to the Comment field of added .mp3.
Can anyone help me with this? Please?Better yet, an Applescript that can be used as a folder action to watch the Downloads folder and:
1) Open .mp3s in iTunes and append #single to track Comments, then delete original .mp3s.
2) Open .zip and .rar archives, parse then unarchived folder for .mp3 files, add them to iTunes, append #album to track Comments, then delete original folder of .mp3s.
2a) Bonus points if the script adds the .mp3s to itunes in descending order based on file name track numbers (track 10, track 9, track 8...). -
Need help creating a folder action for creating folders based on filenames.
I want to create a folder action that will monitor a folder and every time a file is added to the folder it will create a directory using the filename (minus the extension) and move the file the that directory
on run {input, parameters} -- create folders from file names and move
set output to {} -- this will be a list of the moved files
repeat with anItem in the input -- step through each item in the input
set {theContainer, theName, theExtension} to (getTheNames from anItem)
try
set destination to (makeNewFolder for theName at theContainer)
tell application "Finder"
move anItem to destination
set the end of the output to the result as alias -- success
end tell
on error errorMessage -- duplicate name, permissions, etc
log errorMessage
# handle errors if desired - just skip for now
end try
end repeat
return the output -- pass on the results to following actions
end run
to getTheNames from someItem -- get a container, name, and extension from a file item
tell application "System Events" to tell disk item (someItem as text)
set theContainer to the path of the container
set {theName, theExtension} to {name, name extension}
end tell
if theExtension is not "" then
set theName to text 1 thru -((count theExtension) + 2) of theName -- just the name part
set theExtension to "." & theExtension
end if
return {theContainer, theName, theExtension}
end getTheNames
to makeNewFolder for theChild at theParent -- make a new child folder at the parent location if it doesn't already exist
set theParent to theParent as text
if theParent begins with "/" then set theParent to theParent as POSIX file as text
try
return (theParent & theChild) as alias
on error errorMessage -- no folder
log errorMessage
tell application "Finder" to make new folder at theParent with properties {name:theChild}
return the result as alias
end try
end makeNewFolder
This script almost does what I need except for the fact that it screws up on files with periods in them
for example
1.2.3.4.txt
will create the directorys 1, 2, 3, and 4 instead of 1.2.3.4 -
Automator Folder Action Not Running
I have created a simple automator folder action that helps me to keep my downloads folder organized. I want to move various files with certain file exensions to specific folder.
I am finding the process to be intermittantly successful. Sometimes it works, sometimes it does not run. I've looked in activity monitor but do not see the automator launcher process running. I think that is why I am having issues. At other times, when it does run, the workflow hangs and I have to kill Automator Runner.
Any ideas on helping me with automator folder actions?
Thank you,
JeroldWhat does Finder -> select folder -> Control-Click -> Services -> Folder Actions Setup say about your existing folder action?
Are folder actions enabled in the setup window?
Is your folder action attached to your folder?
For diagnostics, create a very simple Automator folder action (such as "Ask for Confirmation"; it does not need to make sense, it just needs to be something that you can use to verify the folder action occurred), and attach that to any folder. If that works, build up to making your PDF action work. -
Apple Script to automatically apply automator folder action workflows
Hello
I'm trying to get an applescript to automatically apply an automator folder action workflow to a folder..
Getting applescript to apply a scpt file to a folder as a folder action is straight forward. However, it seems that scpt files are different than automator folder action workflows..
Normally I would just script the folder action in apple script, but this is for someone that can handle automator, but not apple script coding. This whole scripting is to solve the issue of subdirectories being creating and then files or subfolders being created there after. So we need to try to get automator folder actions to propagate though.. easy enough with applescript..
Any help would be appreciated...Here is the code that I needed to happen... Maybe I just missed something in automator... but this applescript properly applies itself to subfolders, which then allows me to apply specific scripts based on folder names and locations. Also if the subfolders already exist.. the scirpt also is applied to those.
on adding folder items to this_folder
createlist(this_folder)
end adding folder items to
on createlist(item_list)
set ActionScript to " REMOVED FOR PUBLIC DISPLAY:ApplyScriptSubfolders.scpt"
set the the_items to list folder item_list without invisibles
set item_list to item_list as string
repeat with i from 1 to number of items in the the_items
set the_item to item i of the the_items
set the_item to (item_list & the_item) as alias
set this_info to info for the_item
if folder of this_info is true then
tell application "System Events"
display dialog "Attching script to " & the_item as text --
attach action to folder (the_item as text) using ActionScript
end tell
my createlist(the_item)
end if
end repeat
end createlist
I appreciate your help.. if you now know what has to happen and have a shorter way of doing so, please do so..
Thank you again, -
How to set up Automator Folder Actions?
I have set up and sucessfully tested a workflow which sends any file found in a particular folder to the "paperless" app, then moves all files to a different folder called "Archived attachments".
HOWEVER as a folder action, nothing happens when a file is put into the folder. The file just sits there in the folder.
To create a folder action I opened "new folder action" in Automator, then dragged and dropped the working workflow file into the workspace, then set "Folder Action recieves files and folders added to" the appropriate folder, let's call it "Attachments".
Just to complicate things, the files are placed into the "Attachments" folder using an applescript that captures all pdf mail attachments. This applescript works succesfully.
So, where could I be going wrong?
The working workflow "Attachments.workflow" consists of:
Get Specificed Finder Items
Make Sequential
Get Folder Contents
Open Finder Items
Get Folder Contwents
Label Finder Items
Get Folder Contents
New Dated Folder
The erronious Folder Action consists of:
Run Workflow (Attachments)
In folder actions setup:
"Enable Folder Actions" is ticked
"PDF Attachments" folder is ticked
"Attachments_folder.workflow" script is on.I'm confused. You showed two Automator actions with the same name, one was a folder action one wasn't.
Are you sure the correct Automator action (the one that is a folder action) is attached to the folder?
If when the Folders Action setup window is opened and you select Articles_Folder.workflow and then edit script are you getting the right workflow?
Assuming you do I would start off very simply. Try this:
It will label green screen shot image files saved to the Desktop.
See if this works for you. -
I have an Automator Folder action attached to my Downloads folder which moves any .jpg file to another folder where I normally place my images. It works for a while (automatically moving the .jpg files whenever a file is placed in the Downloads folder) and then stops fopr no apparent reason. On occassion when I logoff and on or restart, the action will work for a limited time.
I don't have much experience with Automator and even less with Applescript. Any help will be much appreciated.
I use an iMac with OS X 10.9.2.
Thanks.Sorry... this is not an answer to your problem. More like an addition to your question.
How do you attach an Automator Workflow as a folder action?
I've made a Workflow to copy all files from an iTunes' playlist to a USB device, I want it to automatically run whenever I plug in the USB device. I've left-clicked the icon for the USB device and then "attach folder action", but I don't see any script to run an Automator Workflow. -
ITunes 10.5 breaks automator folder action
Just like itunes10 did
osx 10.6.8
itunes 10.5
automator folder action with itunes tasks no longer works after 10.5 update.
Is it the version check again?Unfortunately, it seems that this is a cross-platform problem between iTunes 10.5 and all NAS disks. Shared libraries on network drives worked fine under 10.4.1, but now there is just an endless loading cycle with no error message or time-out. There is a bit more about it in this thread.
Martin -
Need some help with putting a folder in users directory
I'm not sure how to do this, but what I want to do is put this file in C:/My Documents, but I need to be able to verify that C://My Documents exists, if not put it in C:/Program Files.
Can any one help me out?
try {
String[] contactArray = parseDatFile(fc.getSelectedFile());
Document document = createXMLDocument(contactArray);
saveToXMLFile(
document,
new File(
"C:/Program Files/xxx/",// looks for directory for list
"xxxxxxxxxxxxxxxxxxxxxxxxxxxx"));
} catch (Exception exc) {
File f = new File("C:/Program Files/xxx/");// setting directory for list if not there
boolean yes = true;
yes = f.mkdir();// creating directory
try {
String[] contactArray = parseDatFile(fc.getSelectedFile());
Document document = createXMLDocument(contactArray);
saveToXMLFile(
document,
new File(
"C:/Program Files/xxx/",// used only if the directory didn't exist
"xxxxxxxxxxxxxxxxxxxxxxx"));Need some help with putting a folder in users directoryI recomend using System.getProperty( "user.home" ) not a hard-coded value.
This will use the users home folder ( C:\My Documents ) on Win9X (I guess), C:\Documents and Settings\<current user> on Win2K +, and ~ on Unix-a-likes. -
Using Automator Folder Actions
I have an automator folder action that runs to take any pdf file dumped in to the folder, send to the printer and then delete it.
How do I make this run on a server that I'm not logged in to (effectively as a service), so that if a pdf file is generated somewhere on the network (maybe even a PHP script on a web site hosted on this server) and copied to this folder it still auto prints to the network printer?I'm using a hot folder to import to Aperture as well, and also had the same problems when I try to configure it.
I solve it by creating an action in Automator that will copy all the images from the memory card to a temp folder when a card is inserted in the card reader. At the end of the action all the files inside the temp folder are moved to the actual hot folder, as you said this is almost instant so works perfectly.
So basicly the workaround is the following:
Card inserted - Image capture starts and copy all the images to a temp folder - Images then move to Aperture's hot folder - Aperture gets all the images. -
I need help with Creating Key Pairs
Hello,
I need help with Creating Key Pairs, I generate key pais with aba provider, but the keys generated are not base 64.
the class is :
import java.io.*;
import java.math.BigInteger;
import java.security.*;
import java.security.spec.*;
import java.security.interfaces.*;
import javax.crypto.*;
import javax.crypto.spec.*;
import au.net.aba.crypto.provider.ABAProvider;
class CreateKeyPairs {
private static KeyPair keyPair;
private static KeyPairGenerator pairGenerator;
private static PrivateKey privateKey;
private static PublicKey publicKey;
public static void main(String[] args) throws Exception {
if (args.length != 2) {
System.out.println("Usage: java CreateKeyParis public_key_file_name privete_key_file_name");
return;
createKeys();
saveKey(args[0],publicKey);
saveKey(args[1],privateKey);
private static void createKeys() throws Exception {
Security.addProvider(new ABAProvider());
pairGenerator = KeyPairGenerator.getInstance("RSA","ABA");
pairGenerator.initialize(1024, new SecureRandom());
keyPair = pairGenerator.generateKeyPair();
privateKey = keyPair.getPrivate();
publicKey = keyPair.getPublic();
private synchronized static void saveKey(String filename,PrivateKey key) throws Exception {
ObjectOutputStream out= new ObjectOutputStream(new FileOutputStream(filename));
out.writeObject(key);
out.close();
private synchronized static void saveKey(String filename,PublicKey key) throws Exception {
ObjectOutputStream out= new ObjectOutputStream( new FileOutputStream(filename));
out.writeObject(key);
out.close();
the public key is:
�� sr com.sun.rsajca.JSA_RSAPublicKeyrC��� xr com.sun.rsajca.JS_PublicKey~5< ~��% L thePublicKeyt Lcom/sun/rsasign/p;xpsr com.sun.rsasign.anm����9�[ [ at [B[ bq ~ xr com.sun.rsasign.p��(!g�� L at Ljava/lang/String;[ bt [Ljava/lang/String;xr com.sun.rsasign.c�"dyU�| xpt Javaur [Ljava.lang.String;��V��{G xp q ~ ur [B���T� xp ��ccR}o���[!#I����lo������
����^"`8�|���Z>������&
d ����"B��
^5���a����jw9�����D���D�)�*3/h��7�|��I�d�$�4f�8_�|���yuq ~
How i can generated the key pairs in base 64 or binary????
Thanxs for help me
Luis Navarro Nu�ez
Santiago.
Chile.
South America.I don't use ABA but BouncyCastle
this could help you :
try
java.security.Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
java.security.KeyPairGenerator kg = java.security.KeyPairGenerator.getInstance("RSA","BC");
java.security.KeyPair kp = kg.generateKeyPair();
java.security.Key pub = kp.getPublic();
java.security.Key pri = kp.getPrivate();
System.out.println("pub: " + pub);
System.out.println("pri: " + pri);
byte[] pub_e = pub.getEncoded();
byte[] pri_e = pri.getEncoded();
java.io.PrintWriter o;
java.io.DataInputStream i;
java.io.File f;
o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pub64"));
o.println(new sun.misc.BASE64Encoder().encode(pub_e));
o.close();
o = new java.io.PrintWriter(new java.io.FileOutputStream("d:/pri64"));
o.println(new sun.misc.BASE64Encoder().encode(pri_e));
o.close();
java.io.BufferedReader br = new java.io.BufferedReader(new java.io.FileReader("d:/pub64"));
StringBuffer keyBase64 = new StringBuffer();
String line = br.readLine ();
while(line != null)
keyBase64.append (line);
line = br.readLine ();
byte [] pubBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
br = new java.io.BufferedReader(new java.io.FileReader("d:/pri64"));
keyBase64 = new StringBuffer();
line = br.readLine ();
while(line != null)
keyBase64.append (line);
line = br.readLine ();
byte [] priBytes = new sun.misc.BASE64Decoder().decodeBuffer(keyBase64.toString ());
java.security.KeyFactory kf = java.security.KeyFactory.getInstance("RSA","BC");
java.security.Key pubKey = kf.generatePublic(new java.security.spec.X509EncodedKeySpec(pubBytes));
System.out.println("pub: " + pubKey);
java.security.Key priKey = kf.generatePrivate(new java.security.spec.PKCS8EncodedKeySpec(priBytes));
System.out.println("pri: " + priKey);
catch(Exception e)
e.printStackTrace ();
} -
Help with creating a form, I want to add a check box to enable me to unlock certain fields and deselect the block again
Look to the right under "More Like This". Your issue has been discussed many many times. The error you are seeing is because you do not have enough free "contiguous" space on your hard drive. Read the other threads that address this issue to find how to solve the issue.
Or, put "The disk cannot be partitioned because some files cannot be moved" into the search box at the upper right of this page. -
Hey i need help with creating a quiz with scoring and all.
I need a helping hand so if you can get me started that
would help a lot.
Use the Question class to define a Quiz class. A
quiz can be composed of up to 25 questions. Define the add method
of the Quiz class to add a question to a quiz. Define the giveQuiz
method of the Quiz class to present each question in turn to the user,
accept an answer for each one, and keep track of the results. Define
a class called QuizTime with a main method that populates a quiz,
presents it, and prints the final results.
// Question.java Author: Lewis/Loftus/Cocking
// Represents a question (and its answer).
public class Question implements Complexity
private String question, answer;
private int complexityLevel;
// Sets up the question with a default complexity.
public Question (String query, String result)
question = query;
answer = result;
complexityLevel = 1;
// Sets the complexity level for this question.
public void setComplexity (int level)
complexityLevel = level;
// Returns the complexity level for this question.
public int getComplexity()
return complexityLevel;
// Returns the question.
public String getQuestion()
return question;
// Returns the answer to this question.
public String getAnswer()
return answer;
// Returns true if the candidate answer matches the answer.
public boolean answerCorrect (String candidateAnswer)
return answer.equals(candidateAnswer);
// Returns this question (and its answer) as a string.
public String toString()
return question + "\n" + answer;
}Do you know why this lazy fart-ass is back? Because when he posted his homework last week, some sorry-assed idiot went and did it for him.
http://forum.java.sun.com/thread.jspa?threadID=5244564&messageID=10008358#10008358
He didn't even thank the poster.
It's the same problem over and over again. You feed the bears and it only teaches them to come back for handouts.
My polite suggestion to the original poster: please do your own fucking homework. -
Need help with creating a brush
Hi guys,
I wanted to ask for help with creating a brush (even a link to a tutorial will be goon enough ).
I got this sample:
I've created a brush from it, and i'm trying to get this kind of result:
but it's only duplicates it and gives me this result:
Can someone help me please understand what i need to define in order to make the brush behave like a continues brush instead of duplicate it?
Thank you very much
shlomitwhat you need to do is make a brush that looks like the tip of a brush. photoshop has several already but you can make your own that will be better.
get a paintbrush and paint a spot kind of like what you did but dont paint a stroke. make it look kindof grungy. then make your brush from that, making sure to desaturate it and everything.
EDIT:
oh, and if you bring the fill down to like 10-20% your stroke will look better -
I need help with creating PDF with Preview...
Hello
I need help with creating PDF documetns with Preview. Just a few days ago, I was able to create PDF files composed of scanned images (notes) and everything worked perfectly fine. However, today I was having trouble with it. I scanned my notebook and saved 8 images/pages in jpeg format. I did the usual routine with Preview (select all files>print>PDF>save as PDF>then save). Well this worked a few days ago, but when I tried it today, I was able to save it, but the after opening the PDF file that I have saved, only the first page was there. The other pages weren't included. I really don't see anything wrong with what I'm doing. I really need help. Any help would be greatly appreciated.I can't find it. I went into advanced and then document processing but no batch sequence is there and everything is grayed out.
EDIT: I realized that you cant do batch sequences in standard. Any other ideas?
Maybe you are looking for
-
Users cannot publish and get error message
Hey everyone. This one is stumping us here at the office. Some clients have been having a problem publishing things they have worked on from both their home AND their office. The error message they have been getting is quote: Contribute encountered a
-
Adding a watermark from App-Level script
Hello all, I've have a folder-level script that puts a button on the toolbar. This button calls a function that will insert watermarks and append several PDF documents to the current one. I've hit a roadblock with this.addWatermarkFromFile(). Whe
-
Best practice using Using the WebLogic Timer Service
Hi, We have a stateless session bean having a method which needs to be called lezs say every 10 Seconds. I think the WebLogic Timer Service (JMX) should exactly fit in this problem. So I would write a small class implementing the interface Notificati
-
I just installed the Oracle Fusion Middleware server. The server start fines and I can get to the admin console and use it, but once I deploy the console I begin to get exceptions on the server and it pegs the processor at 100%. The expection is : <N
-
9iAS Forms: FTREE.FIND_TREE_NODE ignoring start point parameter?
Has anyone succeeded in defining start point other than tree root node when calling FTREE.FIND_TREE_NODE? I'm trying to implement a search that starts from the currently selected node and finds the next one matching the search term but it seems to al