• 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
AppleScript Studio & File Paths
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AppleScript Studio & File Paths


  • Subject: AppleScript Studio & File Paths
  • From: Connor DiPietro <email@hidden>
  • Date: Mon, 12 May 2008 22:11:46 -0400

Hi All,
Heres a tuffy.

I have made an applescript studio application, in which, the user selects a file at launch. Okay, so i set the file path of the choice to a variable, then converted it to a POSIX path, for use in shell scripting. The shell script is


mv /the/file.txt /the/.file.txt (notice the . in the second one)

Essentially, this should hide the file from the average file browser. I need to be able the have the file path assigned to a variable, the file name with extension i.e. file.txt, and lastly the entire line of the path up util the name and extension. So i would need a variable for variable1= the/file.txt variable2=file.txt and variable3=the/
I hope you understand what i am saying here. This would then translate into the shell script as...


do shell script "mv " & variable1 & " " & variable3 & "." & variable2

I know nothing about 'delimiters' but would love to learn if this is the right route. Thanks to all for any help!

Connor

_______________________________________________
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
  • Follow-Ups:
    • Re: AppleScript Studio & File Paths
      • From: "Mark J. Reed" <email@hidden>
  • Prev by Date: Re: Wait Until Process Completion
  • Next by Date: Re: AppleScript Studio & File Paths
  • Previous by thread: Re: Wait Until Process Completion
  • Next by thread: Re: AppleScript Studio & File Paths
  • Index(es):
    • Date
    • Thread