• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How can I differentiate a jump drive folder from a HD folder of the same name?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How can I differentiate a jump drive folder from a HD folder of the same name?


  • Subject: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • From: Luther Fuller <email@hidden>
  • Date: Fri, 10 Sep 2010 16:28:54 -0500

On Sep 10, 2010, at 8:53 AM, Jim Brandt wrote:

How can I differentiate a jump drive folder from a HD folder of the same name?

I have a jump drive that I have partitioned into three "drives"  with names that match corresponding folders on my hard drives. I use this jump drive on my MacBook to download and save files in various folders on these partitions. I do this so I can use the same scripts that normally run on my desktop machine.

I now need to write a script that will recognize the jump drive and all its files, and sync the various folders to ones on the desktop machine. This is so I can collect the data while I'm on vacation (using the MacBook) but can put the files back on the desktop machine as if I had been there all the time.

So, for example, I have a folder, named abc, on the hard drive HD1. I have a folder abc on jump drive partition HD1. I want to copy all files that exist in this folder from the jump drive to the corresponding folder on the HD.

My question: Is there a way to differentiate, in a script, a volume as a jump drive as opposed to being on the HD so I can create Finder copy statements for each file in each folder I need to sync?

If getting the 'ejectable' of a drive can't be used, then there are other methods ...

You could save your script as an application bundle and install it on the jump drive. Write the application so that it "knows" that the drive on which it is installed is the jump drive.

You can also get the UUID of the drives. Use this ...

set diskAlias to alias "Work_Files" -- <---- your disk here
set posixPath to (quoted form of (POSIX path of diskAlias))
set uuid to do shell script "diskutil info " & posixPath
--
set AppleScript's text item delimiters to {"Volume UUID:"}
set uuid to text item 2 of uuid
set AppleScript's text item delimiters to {return}
set uuid to text item 1 of uuid
set AppleScript's text item delimiters to {space}
set uuid to last text item of uuid

Your script would have to have the uuid of the jump drive as a property. And this could get complicated. You can get the uuid, but you can't use it to refer to a disk.

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

References: 
 >How can I differentiate a jump drive folder from a HD folder of the same name? (From: Jim Brandt <email@hidden>)

  • Prev by Date: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Next by Date: List is in another list
  • Previous by thread: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Next by thread: Re: How can I differentiate a jump drive folder from a HD folder of the same name?
  • Index(es):
    • Date
    • Thread