• 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: New to OS 10 help Please
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: New to OS 10 help Please


  • Subject: RE: New to OS 10 help Please
  • From: "Easthope, John R" <email@hidden>
  • Date: Wed, 2 Apr 2003 08:58:01 -0700

What do you do about files that may have the same name?

_________________________________________

John Easthope
School Technology Support Analyst
Calgary Board of Education
Help Desk: 294-8111 Fax: 294-8689
Email: email@hidden
_________________________________________



> ----------
> From: Andrew Oliver
> Sent: Tuesday, April 1, 2003 4:32 PM
> To: email@hidden; email@hidden
> Subject: Re: New to OS 10 help Please
>
> The simplest way is not to select any items at all
>
> Since it looks like you're trying to collapse multiple subfolders into one
> folder, a simple recursive script will do the job much better:
>
> property destFolder : "Macintosh HD:MOVED" -- or wherever the destination
> folder is
>
> tell application "Finder"
> set sourceFolder to folder "MOVE ME" -- of disk "blah", etc.
> my moveFilesFrom(sourceFolder)
> end tell
>
> on moveFilesFrom(thisFolder)
> tell application "Finder"
> set filesToMove to every file of thisFolder
> repeat with aFIle in filesToMove
> move aFIle to folder destFolder
> end repeat
> set subFolders to (every folder of thisFolder)
> repeat with aFolder in subFolders
> my moveFilesFrom(aFolder)
> end repeat
> end tell
> end moveFilesFrom
>
> The idea here is that the script tells the finder to move 'every file' in
> the folder. It then gets a list of every folder inside the current folder
> and calls itself. This will repeat through all subfolders until all files
> are moved.
>
> It doesn't rely on any kind of object selection in the Finder, so it can
> run
> quietly in the background while the user is performing other tasks -
> something you can't do it you're trying to move the selected item in the
> Finder.
>
> On 4/1/03 11:53 AM, "email@hidden" <email@hidden> wrote:
>
> > Having just migrated to OS X I have a script (from OS9 ) that I use a
> lot and
> > can't figure out how to get it to work in OS X. I am trying to pull all
> the
> > files out of a large number of folders and put them into one folder. I
> > understand finder is different in 10 but can't figure out how to just
> select
> > the files and not the folders.... I get "Finder got an error: Can't set
> > expanded of selection to true" from the following script....
> > tell application "Finder"
> > with timeout of 300 seconds
> > activate
> > select {every folder of folder "MOVE ME"}
> > set expanded of selection to true
> > select {every item of every folder of folder "MOVE ME"}
> > move selection to folder "MOVED"
> > end timeout
> > end tell
> >
> > Thanks for any help in this matter.
> > Mark
> > email@hidden
> > _______________________________________________
> > applescript-users mailing list | email@hidden
> > Help/Unsubscribe/Archives:
> > http://www.lists.apple.com/mailman/listinfo/applescript-users
> > Do not post admin requests to the list. They will be ignored.
> _______________________________________________
> applescript-users mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/applescript-users
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: New to OS 10 help Please
      • From: Andrew Oliver <email@hidden>
  • Prev by Date: Mail.app: Reindexing Inbox
  • Next by Date: Re: do shell script security issue
  • Previous by thread: Re: New to OS 10 help Please
  • Next by thread: Re: New to OS 10 help Please
  • Index(es):
    • Date
    • Thread