Is Binfile broken?

Bob Sneidar bobsneidar at iotecdigital.com
Tue Sep 30 12:06:33 EDT 2014


I have 2 variables: 

theSourceFile which is binfile:/Users/bobsneidar/Documents/Livecode Projects/Forms Generator/Installs/1105 Media Inc/Chatsworth/20140805-Service Invoice.pdf
TheDestFile which is binfile:/Users/bobsneidar/Desktop/Install Forms/1105 Media Inc/Chatsworth/20140805-Service Invoice.pdf

I issue the command: put URL theSource into URL theDestination. Nothing happens. No file gets copied. Is URL bin file deprecated??

I then, thinking I misunderstood the put URL command, opened theSourceFile (after removing the binfile: part) for binary read. I then read the data until eof (the it variable shows binary data). I then opened theDestFile for write (also after removing the binfile: part) and wrote it then closed the file. STILL there is nothing! 

I’ve run into this before. I changed permissions to everyone write, still nothing. What am I doing wrong? Here is the code:

         open file theSourceFile for binary read
         read from file theSourceFile until eof
         close file theSourceFile
         put it into theSourceData
         
         open file theDestFile for binary write
         write theSourceData to file theDestFile
         close file theDestFile

	
Bob S



More information about the use-livecode mailing list