copy a image/binary file on a mac

yves COPPE yvescoppe at skynet.be
Sat Jan 19 13:32:01 EST 2002


Hello,

>
>function ye_olde_filetype el_patho
>   put the directory into old_dir
>##always a good idea to save and restore the original directory !
>##a MUST if you work with relative paths for images etc...
>
>   set the itemdel to "/"
>   put last item of el_patho into the_file
>##the filename
>
>   delete last item of el_patho
>   set the directory to el_patho
>##now we are in the folder where the file resides
>
>   put the long files into all_files
>##take a look in the reference about "the long files"
>##that returns a list with lots of infos about the content of a folder
>##(divided by a comma)
>##like the filename, date of last modification, last saved ...
>##and the filetype as the last item of each line
>
>   get line(lineoffset(the_file, all_files)) of all_files
>##now we extract that line containing the filename
>
>   set the itemdel to ","
>##restore the old itemdel. very important
>   set the directory to old_dir
>##restore the old directory
>
>   return last item of it
>##that's it
>end ye_olde_filetype
>
>
>Hope that helps.
>
>Have a nice weekend.
>
>
>Best from rainy germany
>
>Klaus Major
>k_major at osnabrueck.netsurf.de
>



The function ye_olde_filetype doesn't work.
But your explication is correct.
So I write :

set the fileType to "8BIMJPEG" BEFORE copying the image and it works fine.

The problem comes from the fact that your funciton doesn't return a filetype.
it only returns empty !

So if you can ameliorate your function, it will be possible to copy 
justŠanythingŠ
-- 
Greetings.

Yves COPPE

Email : yvescoppe at skynet.be



More information about the use-livecode mailing list