• 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
ListOfItems
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ListOfItems


  • Subject: ListOfItems
  • From: Savash Kalay <email@hidden>
  • Date: Mon, 26 Aug 2002 18:14:11 -0400

Hi Guys,

I am trying to get a folder content list as a text file so far I can only
get the folder name but I need to get the content of the folder not the name
of the folder.

I.e.

If I choose a folder with 15 files in it

Now it is listing:
Macintosh HD:Users:savash:Desktop:untitled folder:


It will be a dream if it lists all 15 items not the folder name like:

1- itemName 1
2- itemName 2
3- itemName 3
4- itemName 4 so on..



any help would be appreciated here is the script.

Thank you for your help.

All best,
Savash




-----------------
on open listOfItems

set listOfPaths to ""

repeat with anItem in listOfItems

set aPathname to (anItem as string)
set listOfPaths to listOfPaths & aPathname & return

end repeat

tell application "Finder"

set thePath to (desktop as text) & "File Information"

set theRefNum to open for access file thePath with write permission

try

set file type of file thePath to "TEXT"
set creator type of file thePath to "ttxt"

set eof theRefNum to 0

write listOfPaths to theRefNum

close access theRefNum

on error number errNum from badObj

close access theRefNum

error number errNum from badObj

end try

end tell

return {thePath as alias}

end open
-----------------
_______________________________________________
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: ListOfItems
      • From: Shane Stanley <email@hidden>
  • Prev by Date: Re: OT: Re: New Address Book in Jaguar 10.2...
  • Next by Date: Generating HTML emails with Eudora
  • Previous by thread: Re: OT: Re: New Address Book in Jaguar 10.2...
  • Next by thread: Re: ListOfItems
  • Index(es):
    • Date
    • Thread