Thank you Jan,

I'll try this

Pascal


Le 24 ao�t 04, � 13:24, Jan Schenkel a �crit :

--- Pascal Jablonka <[EMAIL PROTECTED]>
wrote:
Ok troy,
Thank you to worry about
"serveur" is the adress of ftp host
(ftp://user:[EMAIL PROTECTED]/)
"arbo" contains the complete path of folder that is
displayed
"y" (parameter) contains the term "fichier" and the
name of the file
wich the user wants to transfer
"fichier" is the url of the file (arbo & y)
"connexion" is a boolean to show or hide the state
(connected or not of
the transfert)
arbolocale is a handler that shows the state of
defaultfolder after
transfert (should do)

on transfert y
   global serveur, arbo, connexion
   switch word 1 of y
   case "dossier"
     delete word 1 of y
     -- � traiter par r�cursivit� (to be writen
later)
     break
   case "fichier"
     delete word 1 of y
     put arbo & y  into fichier
     put true into connexion
     set visible of button "activit� serveur" to
connexion
     libURLDownloadToFile fichier
     if the result is not empty then answer fichier
& return & the result
     put false into connexion
     arbolocale defaultfolder
     break
   end switch
end transfert

Y probably did something wrong but, as usual when
you have something
just under your eyes, you don't see it

Pascal


Hi Pascal,

My name isn't Troy, but I'll respond anyway -- that's
what the list is for :)
A quick look at the Transcript dictionary reveals :
  libURLDownloadToFile downloadURL,filePath
Where the parameter <downloadURL> is the full path,
including the server, of the file to download ; and
the parameter <filePath> is the local path where you
want to save the file after download.

Applying this to your code, you'd get :
--
on transfert y
   global serveur, arbo, connexion
   switch word 1 of y
   case "dossier"
     delete word 1 of y
     -- � traiter par r�cursivit�
     -- (to be writen later)
     break
   case "fichier"
     delete word 1 of y
     put arbo & y  into fichier
     put true into connexion
     set visible of button "activit� serveur" to \
         connexion
     put serveur & arbo & y into downloadURL
     put the defaultFolder & "/" & y into filePath
     libURLDownloadToFile downloadURL, filePath
     if the result is not empty
     then answer fichier & return & the result
     put false into connexion
     arbolocale the defaultFolder
     break
   end switch
end transfert
--

Hope this helped,

Jan Schenkel.

=====
"As we grow older, we grow both wiser and more foolish at the same time." (La Rochefoucauld)



__________________________________ Do you Yahoo!? Yahoo! Mail Address AutoComplete - You start. We finish. http://promotions.yahoo.com/new_mail _______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution


_______________________________________________ use-revolution mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to