• 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: getting the user's download folder
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: getting the user's download folder


  • Subject: Re: getting the user's download folder
  • From: John Delacour <email@hidden>
  • Date: Fri, 11 Apr 2003 11:25:08 +0100
  • Mac-eudora-version: 6.0a14

At 5:36 pm +1000 11/4/03, Richard Morton wrote:

This works for me, with the dl folder on another disk, but returns "Disk:Downloads" - i.e. no trailing colon.

The trailing colon is not given in the plist, so it needs to be added. If you want to do this in the script then:

getDownloadFolder()
on getDownloadFolder()
read POSIX file (do shell script "perl -e '
$f = q~/tmp/tmp~; print $f ;
$_ = `defaults read com.apple.internetconfig`; s~\\s~~g ;
s~(.+adFo[^<]+<)(..)([^>]+)~$3~ ;
$vol = substr $_, 0, 2 * hex $2;
$start = qq~$vol\\63a~ ;
/(..)($start.+)/ and $s = (substr $2, 0, 2 * hex $1) ;
open F, qq~>$f~ ; print F (pack q~H*~, $s) . q~:~ ; '")
end getDownloadFolder
_______________________________________________
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.

References: 
 >Re: getting the user's download folder (From: Richard Morton <email@hidden>)

  • Prev by Date: Re: getting the user's download folder
  • Next by Date: Re: Mystical Arcane Loginwindow events!
  • Previous by thread: Re: getting the user's download folder
  • Next by thread: Re: getting the user's download folder
  • Index(es):
    • Date
    • Thread