Show files with apple script

what is the comand for showing hidden files in applescipt?
mac book black   Mac OS X (10.4.8)  

To display an item inside an invisible folder, you can use a script such as:
tell application "Finder"
reveal alias "Macintosh HD:usr:share:"
end tell
To set the Finder to display all invisible files:
tell application "Finder" to quit
do shell script "defaults write com.apple.Finder AppleShowAllFiles 1" delay 2
tell application "Finder" to run
If you run the first script, the folder will disappear in the Finder after the window is closed or its location is changed. The second script can be turned off by replacing the 1 with a 0.
(18203)

Similar Messages

  • How can I get the size of a file with apple script

    I try to get the size of a file within an apple script. But I did not find information how to do this.

    There are two ways. I think Apple is moving toward using System Events, which is listed first.tell application "Finder"
    set myFile to selection as alias
    --this just gets a file for me to work with
    --coercing it into an alias is required for the other functions
    end tell
    tell application "System Events"
    get size of myFile
    end tell
    set myInfo to (info for myFile)
    get size of myInfo

  • Apple Script For Opening External EML File With Apple Mail

    Hi folks,
    

 I am working with Apple Script for implementing numerous function related to Mail App.
    

I am using the following Apple Script lines for opening the mails which are in Mail app for each modes.
    

View Mode : open theMsg

    Reply View Mode : reply theMsg opening window yes

    Reply All Mode : reply theMsg opening window yes reply to all yes

    Forward Mode : forward theMsg opening window yes



    I want to know how we can open external eml file in different view modes (View, Reply, Reply All and Forward) using Apple Script or Apple Event programmatically with a similar mechanism available through script in Mail App.

    
Thanks in advance.

Regards
    
Nisar

    I'm not sure what you're doing here, but this isn't anything I recognize as compilable applescript. what is this 'mode' thing you're talking about.
    at any rate, if you have a loose emlx file sitting around somewhere you can simply open it in mail (use the 'open' command and the file specification for the emlx file) and work with it appropriately. if you're talking about an actual eml file (e.g. from Outlook Express) you'd have to GUI script Mail's 'import mailbox' command (the applescript handler for importing mail only works with Mail.app mailboxes)

  • Search String in PDF file - MAC Apple Script

    I want to write a Script for Searching String in a PDF File.
    I start with Apple Script and the last 2 days i searching to eliminate the error in the Script.
    set Datei to choose file
    tell application "Adobe Acrobat Professional"
    open Datei
    activate
    find text Datei string "01.07.08"
    end tell
    The script will stopped in line from find text.
    The scrippt will be load a PDF file, activate it an i want to search "01.07.08" and marked it.
    Please help me.
    Thanks michael

    Right, I think I've got on to something here:
    1. I must not have been able to search this particular pdf document in the past, despite what I think I remember.
    2. When I select the Yamaha TDM pdf in Finder and show the Inspector window (CMD-opt-I) I see under "More Info" that Security Method is 'Password Encrypted'. In fact, try to select and copy some of the text: you can't. BUT: print the whole file to a new PDF, then save that new pdf file and use it for searching, ... ta-da! it works!
    I was a bit disappointed in ColorSync's inability to open the file and then Save it As... In the Tiger days, I had used this work-around: I took a password encrypted pdf document, opened it in ColorSync utility (in Applications/Utilities) and saved it under a new filename somewhere on the disk, and this process sort of neglected to cloak it up in its password-protection.
    Oh well, I suppose I can use the Print to PDF method which I describe just here to achieve the same goal. Until, that is, the big-wigs in the publishing companies and Apple are alerted to this fact and strip the 'functionality' from the print process.
    Thanks for posting.

  • Open multi page pdf specific page in Illustrator CS4 with apple script

    I need to open multi page pdf specific page in Illustrator CS4 with apple script. Is it something like this:
    activate  (open file theTargetFolder as PDF with options …).
    Thank you.

    Carlos,
    Muchas Gracias por tu colaboración y excelente script, el que se abra el ESTK no tiene mayor importancia.
    El caso es que Adobe recomienda encarecidamente NO utilizar Illustrator para editar PDFs, por diversas razones, aunque cuando no hay otro remedio o herramienta disponible, o conocida ...
    Para llegar aquí, aparte de San Google, hay que ir a Adobe.es (en mi caso), pestaña de Ayuda,  ..... (hasta aqui bien),
    luego hay que bajar hasta el final y ver Comunidad y Foros...... (esto puede ser)
    al pulsar aparacen un montón de foros se supone de programas pero en inglés,
    y la última línea es de International Forums,  ya casi hemos llegado)
    pulsamos entonces, y por fin se abren cuatro palabras con idiomas, en una dice: español      (casi no me lo puede creer)
    pincho y llego por fin aquí.
    Muy poca gente sabe de la existencia de este pequeño refugio, si a esta dificultad añadimos la peculiar forma de ser de la gente, ....

  • Help Needed with Apple Script

    I need a little help with Apple Script. I have been using a script for several months now, and all of a sudden it just stopped working. Here's the script"
    ============
    with timeout of 9999 seconds
    tell application "Finder"
    activate
    (* copy target file to another disk - to create a backup *)
    duplicate file "Daily.dmg" of folder "File Backups" of disk "HD Mirror" to folder "Data Backup-Daily" of disk "MacHD 1" replacing yes
    (* copy a 2nd target file to another disk - to create a backup *)
    duplicate file "Personal.dmg" of folder "File Backups" of disk "HD Mirror" to folder "Data Backup-Daily" of disk "MacHD 1" replacing yes
    (* now copy the 2nd target file to my iDisk *)
    duplicate file "Personal.dmg" of folder "Data Backup-Daily" of disk "MacHD 1" to folder "Documents" of disk "xxxxxx" replacing yes
    end tell
    end timeout
    ============
    In the above script, xxxxxx represents the name of my iDisk that is mounted in the Finder.
    Here's my issue - the above script worked fine until just recently. However, now the first two steps work fine, but I get this error message while trying to copy the file to my iDisk:
    "The operation could not be completed because some items had to be skipped. 'Personal.dmg'"
    Does anyone have any ideas on how I can fix this? I'm wondering if Mac OS 10.4.5 might be the culprit since this problem seems to have occurred shortly after I upgraded???
    Thanks,
    -AstraPoint

    Hi,
    Assumptions :-
    uuencode command exits
    mailx command exits
    File name is "vas.txt".
    Mail id is "[email protected]"
    # START OF SCRIPT
    #!/bin/ksh
    vasFileName="$1"
    vasRecordsDirFile=/etl/dev/work/wellness/enrl_rej/records/${vasFileName}
    vasMetatdataDirFile=/etl/dev/work/wellness/enrl_rej/metadata/${vasFileName}
    vasHeaderDirFile=/etl/dev/work/wellness/enrl_rej/header/${vasFileName}
    vasHeaderRejDirFile=/etl/dev/work/wellness/enrl_rej/hdrrej/${vasFileName}
    vasFieldsDirFile=/etl/dev/work/wellness/enrl_rej/fields/${vasFileName}
    if [[ -e ${vasRecordsDirFile} ]]
    then
    uuencode ${vasRecordsDirFile} ${vasRecordsDirFile} | mailx -s "process complete and attached are the rejected records" [email protected]
    elif [[ -e ${vasMetatdataDirFile} ]]
    then
    uuencode ${vasMetatdataDirFile} ${vasMetatdataDirFile} | mailx -s "Metadata Mismatch no of fields in detail didn't match" [email protected]
    elif [[ -e ${vasHeaderDirFile} ]]
    then
    uuencode ${vasHeaderDirFile} ${vasHeaderDirFile} | mailx -s "Problem with header file - File Rejected" [email protected]
    elif [[ -e ${vasHeaderRejDirFile} ]]
    then
    uuencode ${vasHeaderRejDirFile} ${vasHeaderRejDirFile} | mailx -s "the Percentage of rejects more than 3 percent File rejected" [email protected]
    elif [[ -e ${vasFieldsDirFile} ]]
    then
    uuencode ${vasFieldsDirFile} ${vasFieldsDirFile} | mailx -s "The header and detail count didn't match File rejected" [email protected]
    else
    echo "File doesn't exist in any of the directories mentioned."
    fi
    # END
    Vijay Bheemineni.

  • Help with Apple Script Code

    Hi,
    I found this Apple script online and here's how it works:
    tell application "QuickTime Player"
    activate
    try
    if not (exists document 1) then display dialog "Please open a QuickTime movie." buttons {"Cancel"} default button 1 with icon 1
    set thefile to (choose file name)
    save document 1 in thefile
    close document 1
    end try
    end tell
    +I run the Apple script+
    *1. It prompts me to open a movie file in Quicktime*
    +I open a movie in Quicktime+
    *2. It prompts me for an name and directory to save the new file in*
    +I enter a name and directory+
    *3. It saves a new reference movie in said directory with said name*
    This is useful if I want to customize every file, but unfortunately, I just want to mass create reference movies for a whole bunch of files.
    What I am looking for is for an Apple script that is a drag and drop application, so I can drop say 100 movie files or so, and have the Apple script create reference movie files with the same name and in the same directory automatically with no prompts.
    Since I am unfamiliar with Apple script I was wondering if someone would be able to edit my existing script to do what I want.
    Thanks so much for your help!

    Use Automator. It's great for repetitious tasks (like the one you've described), and it's very user-friendly. Open Automator, create a new workflow that executes the action you want, and you can apply that action to the resources you wish to edit.
    Good resource here:
    http://bit.ly/

  • HT1752 My MacBook on startup shows file with question mark ,, what now?

    My Mac shows file with question mark, what now.

    Press the power button down to force a emergency use only hardware shutdown.
    Press and hold the Option/alt key on the built in keyboard, boot the machine.
    If MacintoshHD appears, select it and click the arrow, then in System Preferences > Startup Disk reset that. Done.
    Sometimes a NVRAM reset is required then the above done again.
    Folder with question mark issue
    ..Step by Step to fix your Mac
    If MacintoshHD doesn't appear, or if it boots to gray screen or other issues, then it's more complicated of a fix, but once inside OS X then reset the Startup Disk.
    Gray, Blue or White screen at boot, w/spinner/progress bar
    ..Step by Step to fix your Mac
    You might need this if you don't have a recent backup and your problem is software related, Disk Utiltiy can't fix the drive and recommends you backup, erase and install.
    .Create a data recovery/undelete external boot drive
    If Disk Utility + Hardware Test shows no boot drive, then you have a dead drive or cable, or Mac issue.
    My computer is not working, is my personal data lost?

  • My macbook won't strat and show file with question mark on it?

    Hi
    is there anyone can help me please my macbook can't boot and show file with "?"mark on it. 

    Restart and hold command + R (both keys) down. The screen will show four options. Select Disk Utility. Next click on the name of your drive, and run Repair Disk.
    After that is done, restart in the usual way.

  • How to Set JFilechooser to show file with the same extension in the filetyp

    How to Set JFilechooser to show file with the same extension in the filetypes??
    help

    I also don't understand, but if you mean how to display only files with a certain extension in your JFileChooser then you should have a look at the JFileChooser API:
    http://java.sun.com/j2se/1.5.0/docs/api/javax/swing/JFileChooser.html
    The introduction shows an example of how to do that.

  • On iPad can I open a Microsoft word file with apple pages app?

    On iPad, can I open a Microsoft word file with apple pages application?  If so how do I perform this activity?

    Yes you can open Word files. If it is an email attachment you can simply tap and hold down on the icon and select "open in" and then select Pages - as long as you have the Pages app on the iPad.
    Where is the file on your iPad or how do you want to move it to the iPad?

  • Want to replace Wav Files with Apple Lossless in the same folder...Scripts?

    Hello!
    I have about 4,000 wav files (wow) that I digitized from Vinyl. I organize my media folder myself (I have the organize option unchecked in preferences) and most of the songs are not properly tagged. I would love to convert the wav files to apple lossless and have Itunes save the file in the same folder from where it originated. I havent found a way to do this yet. Its weird to me that I can select a song in a playlist and hit "Show in Finder" and it knows exactly where it is yet when I convert files to apple lossless they end up in the "unknown artist-unknown album" folder. Anyone have any ideas or is there any scripts that can do this for me ? thanks so much!!
    I had found one script that deletes the original wav files but still the new apple lossless are still put in the unknown album folder.....
    Zeke

    When iTunes converts a file, it does not allow you to direct the location of the output file, but rather places it according to the Artist/Album tags, which in your case are unknown.
    Almost every other conversion tool allows you to direct the location of the output. There are not a huge choice that run on the Mac and support Apple Lossless, but a good one is Max.

  • Ipod Nano shows file with exclaimation mark!

    Bought this for my daughter for Christmas! Can anyone help me before she gets up in the morning to find it not working!
    The screen shows the file with exclaimation mark. I have followed all the 5R advice on the apple site. All my software is bang up to date on my G4 powerbook - even loaded the software disc onto my imac and installed the software successfully. Neither computer will mount the ipod - itunes won't open automatically. If I open it manually it doesn't see the nano! I have tried restore using the ipod software updater on both computers. Each time it freezes!
    Can anyone help - emergency!

    iPod shows a folder icon with exclamation point when you turn it on
    Seasons Greetings,
    Colin R.

  • Install and uninstall of dmg file using Apple script in Mac 10.6 and higher version.

    Hi ,
    Could anyone please help me to write a Apple script to Install dmg file and do clean uninstall in Mac 10.6.8 and higher version.
    My requirement is:
    When i run script : it has to install the dmg file which is located inside one desktop folder say 'New Folder'
    I need to do clean unistall when i run the script: i need to delete the folder in ~/Library- locate folder say  'CPSPCSHOWSERVER'' move to trash and from Terminal type in command "rm -r ~/.CPS' to completely delte this folder.
    Really appreciated all ur help!!
    Thanks,
    KT.

    http://macfidelity.de/2008/08/30/how-to-mount-a-dmg-from-terminal-in-mac-os-x/in dex.html
    http://osxdaily.com/2011/12/17/mount-a-dmg-from-the-command-line-in-mac-os-x/
    http://hints.macworld.com/article.php?story=20030614230204397
    http://www.commandlinefu.com/commands/view/2031/install-an-mpkg-from-the-command -line-on-osx

  • Indesign server web service - where is the support to upload a file with the script and download the result?

    Hi,
    I am working on a POC that is supposed to convert indd files to pdf (i.e. using of course the indesign server). Basically I want to call the IDS Web Service (located on a different machine perhaps), pass in the input file, the conversion script and retrieve the result as part of the WebService call? 
    Browsing the documentation, examples, etc in the SDK, I couldn't see how the above can be achieved without the client handling the file transfer. Surely I must be missing something ...
    thanks
    Chris

    What do you mean with POC?
    InDesign Server is too precious (i.e. license cost) to waste its time with file transfers.
    For a smaller scale, let a separate process (some http or smb server) on the same server hardware handle the files - so that the InDesign Server can access them on the fastest local volume.
    If you plan for bigger, use a dedicated server for file sharing (your choice of SMB, NFS or whatever), where the input files are prepared by the client process, so that your load balancer can immediately point the next free instance of the InDesign server farm to the file. In that case be prepared for some try and error - high speed file sharing can be tricky with files written from one side not yet visible or incomplete to the other side, locking problems, Unicode file name trouble, unexpected time stamps and so forth.
    Btw, there is also an InDesign Server forum which would be more appropriate for such discussions.
    Dirk

Maybe you are looking for

  • Is it possible to airplay more than one device at a time, for example splitting the screen into quad-view?

    I was told by someone that it is possible to connect up to 4 devices at a time through airplay, but I can't work it out. Is this information incorrect? I'd like to have 4 devices displayed at a time; or at least 2. Thanks

  • Trying to configure Portal to run off the network

    Hi all, I am trying to configure Oracle Portal 3.0.9.8.2 to run off the network. I have taken all of the recommended steps in terms of configuring hostname, using a static IP, running and checking the ssoodatan script, updating the hosts file, and co

  • Embedded Flash video makes links stop working

    I have a strange problem. I embedded a flash FLV video file into Dreamweaver site and I published it. All the links in my site works fine as long as I do not look at the video page more than twice. If I keep going back to look at the video page, some

  • XPath Expression's setup(Document  Def) doesn't seem to be working in 11g

    After setting up XPath Expression's in XPath Tab as part of Doc Definition setup , B2B 11g does not seem to be evaluating them. When I check the reports all the Xpath Value's are empty Am I missing something here or i sthis feature in Preview mode ?

  • JMS Message stays in AQ Topic

    Hello, i have a strange problem with 10.1.2 AS and 10.1.0.4 DB: First, i created the Topic in the database: dbms_aqadm.create_queue_table(      queue_table => 'ADMINTABLE',      queue_payload_type => 'SYS.AQ$_JMS_MESSAGE',      sort_list => 'PRIORITY