• 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: Rewrite simple Finder tell statement to "do shell script"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Rewrite simple Finder tell statement to "do shell script"


  • Subject: Re: Rewrite simple Finder tell statement to "do shell script"
  • From: Christopher Stone <email@hidden>
  • Date: Tue, 11 Sep 2012 05:44:23 -0500

On Sep 11, 2012, at 04:43, Bert Groeneveld <email@hidden> wrote:
tell application "Finder"
move all_foundImageNames to the_CLEANSTART_folder
end tell

Hi, can someone help to rewrite above simple Finder tell statement with "do shell script"?
______________________________________________________________________

Hey Bert,

Look at the man pages for 'cp' and mv' and perhaps 'ditto' and 'rsync'.

A really simple test case:

set _src to "~/test_directory/test_mv/*"
set _dest to "~/Desktop/Desktop_Destination_Folder/"

do shell script "mv " & _src & " " & _dest

You have to convert Mac paths to posix paths and either escape spaces or quote them properly.

set _path to alias "Ryoko:Users:chris:Documents:Apple Hardware Information:"
set posixPath to POSIX path of _path
set _src to (quoted form of posixPath) & "*"
set _dest to "~/Desktop/Desktop_Destination_Folder/"

do shell script "mv " & _src & " " & _dest

Tilde (~) designates the current-user's home folder.

The '*' means all items in the designated path.

Be sure you play around with disposable test files.

Maybe do some reading on the Internet about 'mv' and 'cp'.

If you have problems be sure to state enough of the particulars, so we can help.

--
Best Regards,
Chris

 _______________________________________________
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: 
 >Rewrite simple Finder tell statement to "do shell script" (From: Bert Groeneveld <email@hidden>)

  • Prev by Date: Re: Rewrite simple Finder tell statement to "do shell script"
  • Next by Date: Re: Rewrite simple Finder tell statement to "do shell script"
  • Previous by thread: Re: Rewrite simple Finder tell statement to "do shell script"
  • Next by thread: Re: Rewrite simple Finder tell statement to "do shell script"
  • Index(es):
    • Date
    • Thread