• 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 03:11:29 +0100
  • Mac-eudora-version: 6.0a14

At 9:00 pm -0400 10/4/03, Paul Skinner wrote:

On Thursday, April 10, 2003, at 05:57 PM, John Delacour politely wrote me off-list:

Try that with a disk named "Chrysanthemum" :-)

Grrrrr... Me and my ten-fingered bias for decimal!
I knew that was too easy. Here's the next duck for the shooting gallery. Anyone with their Download folder on a remote Windows server? : )



Glad you like my manners :-)


Here's another way to do it. It would probably be half the length if I'd got my brain round 'pack'.

UsersDownloadFolder()
on UsersDownloadFolder()
do shell script "perl -e '
$file = q~com.apple.internetconfig~ ;
$_ = `defaults read $file | grep -A 1 DownloadFolder`;
s~ ~~g;
$_ =~ /<(.+)>/ and $_ = $1;
$n = 2 * hex substr $_, 0,2;
$diskname = (substr $_, 2, $n);
$start = qq~$diskname\\63a~;
/(..)($start.+)/i and
$pathlength = hex $1
and $_ = $2 ;
for (split //) {
shift; $string .= $_;
length $string == 2 and
$s .= chr hex $string and $string = q~~;
}
print substr $s, 0, $pathlength ;'"
end UsersDownloadFolder
_______________________________________________
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: getting the user's download folder
      • From: John Delacour <email@hidden>
    • Re: getting the user's download folder
      • From: Richard Morton <email@hidden>
    • Re: getting the user's download folder
      • From: Reinhold Penner <email@hidden>
References: 
 >Re: getting the user's download folder (From: Paul Skinner <email@hidden>)

  • Prev by Date: Re: getting the user's download folder/Smile
  • Next by Date: OSAX/Scripting Addition (OS 9) plea
  • Previous by thread: Re: getting the user's download folder
  • Next by thread: Re: getting the user's download folder
  • Index(es):
    • Date
    • Thread