OS X Technologies :: Create A Log File?

Apr 24, 2012

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

2. add it into the test.txt file

3. save the file once done 

Info:
MacBook
Pro, Mac OS X (10.7.3)

View 13 Replies


ADVERTISEMENT

OS X Technologies :: How To Create A Dialog Box

Feb 27, 2012

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?

View 6 Replies View Related

OS X Technologies :: Create Folder With Name Client150412n?

Apr 14, 2012

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 tellThe 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

View 1 Replies View Related

OS X Technologies :: Create Folders And Sort Applescript?

Mar 15, 2012

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.

Info:
MacBook
Pro, Mac OS X (10.6.8)

View 2 Replies View Related

OS X Technologies :: Create ICloud Calendar With Applescript

May 5, 2012

I use the create calendar with name "" and it makes it "On My Mac". Is there any way to make it in iCloud instead?

Info:
Mac Pro, Mac OS X (10.7.3)

View 2 Replies View Related

OS X Technologies :: Run The Create Booklet Workflow As A Folder Action?

Jul 2, 2012

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)

View 1 Replies View Related

OS X Technologies :: Create An Apple-script To Install Printers - Can't Seem To Get It To Work

Mar 21, 2012

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: 

/usr/sbin/lpadmin -p CX560 -E -v lpd://CX560/print -P /Library/Printers/PPDs/Contents/Resources/en.lproj/US-Letter/CX560_V1.PPD -D FireStationCX560 

[code]....

This is the only command I can successfully run in AppleScipt: 

do shell script "/usr/sbin/lpadmin -p CX560 -E -v lpd://CX560/print -P /Library/Printers/PPDs/Contents/Resources/en.lproj/US-Letter/CX560_V1.PPD -D FireStationCX560"  

View 2 Replies View Related

OS X :: Create File List And Batch File Renaming?

Aug 10, 2009

So in windows I can create a file list, save it to a text file, and create a .bat file with rename commands for each file. for example:

Rename 000055-060409232023-CAM1.jpg cal000image0000055.jpg
Rename 000056-060409232020-CAM1.jpg cal000image0000056.jpg
Rename 000057-060409232016-CAM1.jpg cal000image0000057.jpg
Rename 000058-060409232012-CAM1.jpg cal000image0000058.jpg
Rename 000059-060409232008-CAM1.jpg cal000image0000059.jpg
Rename 000060-060409232004-CAM1.jpg cal000image0000060.jpg
Rename 000061-060409232001-CAM1.jpg cal000image0000061.jpg
Rename 000062-060409231957-CAM1.jpg cal000image0000062.jpg
Rename 000063-060409231953-CAM1.jpg cal000image0000063.jpg

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.

View 5 Replies View Related

OS X Technologies :: Open A Very Old Cwk File?

Apr 8, 2012

Is there a way I can use a very old .cwk file? I tried opening it in iWorks '06, the old version I have and it said it couldn't read it.

View 1 Replies View Related

OS X Technologies :: Load A File Into Ram?

Jun 26, 2012

is it technically possible to load a file into ram?

I want this file to be as quick as possib le to open, so i'd like to put it in the ram.

View 3 Replies View Related

OS X Technologies :: Folder Action Does Not Run On SECOND File Only

Mar 7, 2012

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)

View 13 Replies View Related

OS X Technologies :: Formatting A .dmg File As Rdxx?

May 14, 2012

I am trying to convert a .dmg file as an Rdxx (Read-only) image format by using the hdiutil command in Apple's terminal. 

Is it the following command? 

hdiutil convert -format Rdxx [input file].dmg -o [output file].dmg If it's not, then is there any way I can do that correctly? 

      
Info:
MacBook Pro, Mac OS X (10.6.7)

View 5 Replies View Related

OS X Technologies :: Determine The Number Of Records In A File?

May 12, 2012

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

Info:
iMac, Mac OS X (10.7.1)

View 5 Replies View Related

OS X Technologies :: It Loads All File In The Folder When Tried Ro Move One

May 29, 2012

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. 

Info:
Mac Pro, Mac OS X (10.7.3)

View 14 Replies View Related

OS X Technologies :: How To Get A List Of File Names In To A New Folder

Jun 27, 2012

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!

View 6 Replies View Related

OS X Technologies :: File Name Increments With 3 Digit Number?

Jul 4, 2012

I am trying to download a list of mp3 files from urls with the format [url] where the 000 portion of the file name increments into 001, 002, 003...

View 4 Replies View Related

OS X Technologies :: Does The Exclusion Of A File Or Directory Remove Any Existing

Mar 15, 2012

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. 

Info:
MBP, Mac OS X (10.4.8)

View 2 Replies View Related

OS X Technologies :: Add The Correct Extension Based On The File Type?

Apr 6, 2012

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? 

View 3 Replies View Related

OS X Technologies :: Run Multiple Copies Of Skype By Launching The .app File

May 8, 2012

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

View 7 Replies View Related

OS X Technologies :: Add Account Privileges To A Newly Created File?

Jun 11, 2012

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.

Info:
Mac Pro, Mac OS X (10.7.4), 15 GB

View 2 Replies View Related

OS X Technologies :: AppleScript To Append Fourth Line Of Text To File Name

Feb 19, 2012

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).

Info:
Mac OS X (10.7.3)

View 3 Replies View Related

OS X Technologies :: Cannot Find Past File Version Using Time Machine

May 2, 2012

For some reason time machine does not react when I want to enter to find a past file version.

Info:
Time Machine, Mac OS X (10.7.3), MacBook Pro / G-Raid2 640GB

View 1 Replies View Related

OS X Technologies :: Ftp Upload Via Terminal - 553 Rename/move Failure: No Such File Or Directory

Apr 24, 2012

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  

View 1 Replies View Related

OS X Technologies :: Add Time/date Stamp To Screen Capture File Names?

Jul 4, 2012

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" 

Info:
Mac OS X (10.5.8)

View 4 Replies View Related

OS X :: Way To Create A Link To File?

Aug 18, 2006

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?

View 5 Replies View Related

OS X :: Create A New File In Finder?

Oct 26, 2009

Is there really no way to create a new file in finder?

Windows has the simple right click->new menu....

View 7 Replies View Related

OS X :: Can You Create A File From Within Finder?

Jan 3, 2010

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).

View 3 Replies View Related

Software :: How To Create A Txt File Natively

Dec 20, 2007

how to create a .txt file natively.

View 6 Replies View Related

OS X :: How To Sort File By Create Date

Sep 18, 2010

How do I sort files by create date in Finder? I have Name, Date Modified, Size and Kind. I see no way to add File Create Date.

View 2 Replies View Related

Applications :: How To Use Notepad To Create Log File

Dec 16, 2010

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?

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved