But this doesn't save the file in the same manner as when i choose save as in word as a doc document. I save with applescript. However, for some it works out well, but some documents cant be opened after saved with applescript. Word says (translated'. Word / Mac / Office 2011 for Mac. AppleScript is based on the concept of scriptable objects belonging to or being contained in other scriptable objects, such as a file being in a folder that belongs to the hard disk, or a word being part of a paragraph belonging to a story. Hi there - first post from someone relatively new to AppleScript, just getting my head around Automator and wondered if there's a way of setting up a folder action which takes the newly-added files and gets the filename (not necessarily the full filename with extension) and adds it as a line of text (along with a date stamp) to a text document. I've got an Automator application called 'Get filename' but no idea how to turn that into a variable or put that variable into AppleScript format. Would anyone be able to help me devise a workflow to do this? I should explain why this would be useful: I'd like to have a record of when files were originally added to a folder so that if I later edit them I at least know what date particular files were first added. Hi there RM Running 10.6.8. Tried popping that code into AppleScript but seemed to get an error. The message I get reads 'The file (name of file) was added on (null)'. I guess you're saying that the info is there, which is useful, but is there a way of grabbing it either in text form or in some kind of table? I just thought something like creating a workflow which automatically keeps track of when new files are added would be a really common procedure. Perhaps it's more complicated than I thought! Thanks Tardy. Click to expand.You already had something going, with a folder action right? You need to add a second action after 'Get Selected Finder Items' that add the date and file name to a log file. You can pick either Applescript or Shell script I suppose. For shell script, to add the date and file name to a file called 'Added Files.log' in your 'Documents' folder, you can try this: Add the 'Run Shell Script' action and select 'As arguments' in the drop down menu in the upper left corner with the 'Pass input:' label. ![]() Thanks subsonix, that seems to have done it! There is a bit of code at the start of the output which I can probably prune away later, but that's not a problem. That's brilliant! Do you know if the code is recursive - if that's the right word; will it detect if folders below the first level have had files added to them or is that a different piece of code? It works for top level but doesn't seem to detect files added within folders on that level for me. Thanks again! Also, thanks Red Menace - typical I've missed out on the juicy coding! Tardy ---------- I should add it doesn't much matter if it's recursive: I usually put files on that top level first anyway, so don't worry about it. Best steam games on mac. Can you recommend any good books to get to grips with the sort of shell/Applescript coding that would be useful here? Reading from the screen is one thing but I could probably get a lot more from a book! Thanks Tardy.
0 Comments
Leave a Reply. |