Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7026939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:10:59+00:00 2026-05-28T00:10:59+00:00

I’m sure this is very easy, and very simple, but I’m a complete AppleScript

  • 0

I’m sure this is very easy, and very simple, but I’m a complete AppleScript noob.
The script must:

  1. Search through a volume for every item whose kind is AppleWorks document (file extensions will not suffice, as prior to OS X AppleWorks documents with imbedded media were effectively packages, not documents).

  2. Record the path and filename (without an extension) of each document for later.

  3. Copy each document to a different volume.

  4. Manually update each document in various, non-programmatic ways, don’t ask, I just really do have to do this.

  5. Replace each original file with the updated version of itself (probably in a iWork format, now) using the original file names (extension notwithstanding) and original paths.

I’m starting with:

tell application "Finder" to get the path of every item in startup disk

But am immediately presented with:

error "Finder got an error: Can’t get directory of startup disk." number -1728 from directory of startup disk

I’m fairly savvy in a few programming languages, but I know literally nothing about AppleScript. Even some basic pointers on how to collect information (ie. should I use path or directory?) about items, etc. would be appreciated. I’ve got a couple of thousand files in a near-random distribution on my boss’s computer to manage!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T00:11:00+00:00Added an answer on May 28, 2026 at 12:11 am

    To get you started, let me explain how to find the commands you can use. Every application has a “dictionary” of applescript terms and usage. Each application is different so you must look at the dictionary to find the correct terms. So start with the Finder. Open AppleScript Editor and under the file menu you will see “open dictionary”. Choose that and a dialog will open with a list of all your applications. Find the Finder and open it. You can browse the dictionary but you already know some terms so try the search field. Try searching for “item”. You’ll probably get a list of a lot of “item” results, but you want to look for the one whose kind is “class”. Click that and you will see the class file and it shows its properties. Those are the things you can search for.

    Note that you don’t need to get the path because just getting the item is its path. You’ll see that there is a “kind” property and a “name extension” property, which either will help you find the specific document type you’re looking for.

    Normally when you get the items of something you only get the top level items. You won’t get the items in sub-folders. To also search sub-folders you need to use the command “entire contents” (you’ll find that in the dictionary also).

    Last tip, there are many types of “items”. You can narrow your search by focussing on the specific type of item (you can find the different types of items in the dictionary also) you’re looking for. You want a “document file” type.

    So with all of that, here’s what I would do to find all of the appleworks files. First you need to figure out the “kind” property of an appleworks file so you can use it in your script. Run this, choose an appleworks file, and look at the results. You will get a record of the properties. Look at the “kind” value and use that in the second script…

    set a to choose file
    tell application "Finder" to return properties of a
    

    Now put your kind value into this script… it might be something different than “AppleWorks”…

    tell application "Finder"
        set theAppleworksDocs to document files in entire contents of startup disk whose kind is "AppleWorks"
    end tell
    

    This will return a list of files to you. Since it’s a list you can use a repeat loop on the list and query each list item for its name and copy them to another disk. Note, this will probably take a long time because it will search your entire hard drive.

    There is a faster way. You could perform a spotlight search from applescript with the unix utility “mdfind”. But to do that you have to know the kmdItemContentType of the file you want to find and a bunch of other stuff… so stick with the Finder for now. You’ll need the Finder anyway when you do other parts of your job.

    Good luck!

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Seemingly simple, but I cannot find anything relevant on the web. What is the
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this
I have just tried to save a simple *.rtf file with some websites and
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
this is what i have right now Drawing an RSS feed into the php,
I have a French site that I want to parse, but am running into
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I need to clean up various Word 'smart' characters in user input, including but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.