Been up for a while trying to figure this out with no luck. I created an app that will uninstall a program and all of it's files.Â
example try                   do shell script "rm -rf /Applications/TestFakeApp"          end try    try                   do shell script "rm -rf /Applications/TestFakeApp2"          end try    try                   do shell script "rm -rf ~/Library/Preferences/com.FakeTestApp.plist"          end try         try                   do shell script "rm -rf ~/Library/Preferences/com.FakeTestApp2.plist" end try         try                   do shell script "rm -rf ~/Library/Logs/FakeTestApp*"          end try         try                   do shell script "rm -rf ~/Library/Application\ Support/FakeTestApp" end tryÂ
there are alot more paths to remove but this is just a few for exampleÂ
I want to be able to create a log.txt file on the desktop to show what has been removed and or what could not be removed.Â
I then tried by creating a text document by usingÂ
do shell script "touch ~/Desktop/test.txt"Â tell application "Finder"Â open file ((path to desktop folder as text) & "test.txt") using ((path to applications folder as text) & "TextEdit.app")end tellÂ
but I don't know what to do next.Â
1. Have it check for each file to see if it was deleted or not
What i am trying to do is create a program that lets the user have a small conversation with the computer but i don't want to use "else" and list the possible inputs seperatley and have to write the same thing over and over again. does anyone know of a way i can list possible inputs together and have them lead to the same result?
I'm new to ApplesScripting. I've found this script that I'd like to change: --This script will make a new folder on the desktop with current date and dialog box--format the date to 2010-11-19tell (current date) to get day & (it's month as integer) & (it's year as integer)set TheDateFormat to the result as text -- asks for folder name with date as default answerset TheFolderName to text returned of (display dialog "Name the folder" default answer TheDateFormat) --make folder with date & user entered texttell application "Finder" make new folder with properties {name:TheFolderName}end tell The desired changes:- Date format should be: 150412 + a letter (a, b, c) if the folder to be created already exists.- Place the cursor at the start of name dialog, no selection active.- The new folders should be created in /Users/Hans/Dropbox/Jobs/Another question is related to execution of the script:- How can I start the script easily with a shortcut key or a Dock icon?- Is it possible to select client name from a plain text file containing client names in separate lines?- Is it possible to have zip files automatically unzipped to subfolder names with the zip package name?- Regarding the Dock icon I could even imagine that I drag a zip or other file from an email or the Desktop to the icon and that I only have to type the clients name to have the file moved to a new folder. user entered texttell application
I am using a script that Jacques Rioux kindly helped me out with a couple days ago. I altered his script a little to complete a different task I needed to create a shortcut for. The script below first creates two folders (TIFF & JPEG) and then it sorts files with an extension .tif into the 'TIFF' folder and files with the extension .jpg into the folder named 'JPEG'. This works great but I would like the script to effect multiple folders. Can anyone help me add to the script so when you click it, a prompt will pop up allowing you to choose multiple folders to apply the script too? As of now it will only work on one folder at a time.
Please accept my apologies if I'm posting in the wrong section . I've been using the fantastic Create Booklet PDF Service (workflow) by Christoph Vogelbusch (his page is on .mac, so it just went bye-bye). I'd like to turn this worklfow into a folder action so that when a file is added to the folder, a pdf booklet is created automatically. In particular, I'm interested in doing this in Microsoft Word. Can anyone tell me if this is even possible, and if so, either point me in the right direction (or, at least, to the best Automator community where I might repost this request)?
Info: 2.2 GHz Intel Core 2 Duo MacBook Pro, Mac OS X (10.6.3)
I'm running 10.7and I'm trying to create an applescript to install printers. I'm able to run the first command without issues but the other two keeps giving me error messages in applescript. I assume its because the other two commands have spaces? These are the commands I run when in Terminal:Â
how do I create a file list and then create a way to batch rename in os x? I know the commands, but I don't know of a way to do it on more than one file at a time. I have found a few renaming apps but they all appear to be focused on just iterating up instead of renaming specific files to a new name.
Does any one know of a bug or a log for folder scripts that do not run? I am trying to get a basic folder script (to replace %20 in the file name) of the Downloads folder.
When downloading multiple files (two or more) it runs only on the first file, successfully without error, and then never runs on the second file. If I move both of the files out of the Downloads folder and move it back it, the one file that does not get the folder action now does and everything is peachy.So it is not that the folder action is not scripted properly. It is just that the folder does not catch the second file download - guess maybe too fast? Has any one seen this or have this bug?
Info:15" Unibody MacBook Pro , Mac OS X (10.6.4)
I want to analyse record types from a large input file and so far have managed to extract different groups and created the relevant files. All I want to do now is count the number of records in each file so I can produce a report showing the different types but cannot figure out how to do this, I know it will be simple but I cannot get any command to accomplish this
I have a folder action set up to open movie files in a conversion app but every time I add a new file it loads all the files in the folder. How can i exclude a file that has already been opened by the folder action. I can't move the file due to queing up moves for conversion if the file is moved after it is opened the the program doesn't know where to look for it. Ive tried Filter finder items by last opened and set it as today but that did not work. It opened nothing. May I could set it up to know if the file has been there longer then 5 min that the folder action should not open it.Â
if there is a way of having a list of image file names, searching for the images then putting them into a new folder? I'm guessing it can probably be done through mac scripting but I know nothing about scripting and genreally not great with technogy so ideally need step by step instructions!
Does the exclusion of a file or directory remove any existing, already backed up versions of that file or directory from TimeMachine? I have a large file I don't want backed up every time I connect to my backup drive. It's 50GB+. I rarely touch the file, and when I do, I don't use it for anything that needs to be saved, it is a historical only version of my Parallels from an older Microsoft OS. I occasionally need to open it to just look at something, but never 'do' anything with it.Â
I want to exclude it, but don't want any older version of the file to be removed from backup. Does anyone know if exclusions are retroactive into the TimeMachine database? Given this is 50GB+, trying it to find out is a quite slow process.Â
I have a set of photos I"d like to import into iPhoto, but iPhoto doesn't recognize them because they don't have file extensions. Could someone give me a script that will look at each file in a specific folder, check to see if an extension is present, and if not, add the correct extension based on the file type?Â
I figured out how to run multiple copies of skype by launching the .app file from different osx user accounts in terminal. What I'm trying to do now is script this or automate opening terminal and typing the line with automator. The following is the line that I use.Â
su user2 -c "/Applications/Skype.app/Contents/MacOS/Skype && exit"Â
And I just change user2 to user3 for a third instance of skype and so on. how ot automate this process?
Info: iMac, Mac OS X (10.7), 27" / i5 / 8GB RAM
I have multipe accounts on my Mac. Two of them need to share certain files, but not with everyone else so I can't use the Shared folder. When I create a new text file with AppleScript it has default ownership to the account that created it, but I need to give read & write privilages to it to the other account as well. I can do this manually, but there are lots of files sometimes. One trick I've found is to reset privilages from the next higher folder. This saves time, but sometimes I forget. Also when I do this it causes Time Machine to think all the files in that folder have been updated. If the folder is large it may cause Time Machine to purge a old backup version. What I'd like to do is find some AppleScript code I can use to add user "A" with read & write access to the permissions of a new file at the time my AppleScript creates that file.
I have thousands of text files that are named with random unique numerical ID in a specific folder. The problem is I want to be able to do quick sort of the files by a category. The category of each text file is always written as the fourth line of each text file. I would like to write an Applescript to append the fourth line of the text file onto the file name with a underscore in-between. (i.e. Category_1235678.txt).
Cannot seem to upload to a ftp server (permissions are correct on the home folder of the user!)But I get this result:
ftp> put /Users/[userfolder]/Documents/untitled.rtf local: /Users/[userfolder]/Documents/untitled.rtf remote: /Users/[userfolder]/Documents/untitled.rtf 227 Entering Passive Mode (99,254,236,63,209,169) 553-Can't open that file: No such file or directory 553 Rename/move failure: No such file or directory Â
I'm trying to add time/date stamp to my screen capture file names. (at the moment it's just 'Picture 1' etc..)I've tried the following command in terminal but have not had success.
defaults write com.apple.screencapture name "datestamp" at "timestamp"Â
I found a utility that allows me to copy a file's location to the clipboard, but is there a way to create a link to a file location? I'd like to be able to send co-workers a link to files or folders on shared servers, so they can just click the link and get to that location in their Finder. I seem to remember doing this with Windows. Can it be done in OS X?
I've had my macbook for a couple of years now and I just figured you couldn't do this, but I might as well ask:
Can you create a file from within finder?
For example, on Windows machines, you can right click in explorer and it goes something like create new > [folder, text file, word doc, etc]. I know that you can add folders, but I'd love to be able to quickly add a new .txt file without having to open TextEdit first (not that it's any faster, just my workflow).
I am a mac newbie and I used to use Notepad to create log files like this: How to Use Notepad to Create a Log File. Is there something comparable on Mac?