I am trying to split a binary file and then merge it back together and then 
save it as a new file... My code is as follows..

<cfset currentdir=GetDirectoryFromPath(ExpandPath("*.*"))>
        <cfset CurrentFile="#CurrentDir#Dasis.doc">
        <cffile action="readbinary" file="#CurrentFile#" variable="testme">
         <cfset a="">
         <cfset b="">
          <cfloop index="Lenx" from="1" to="23552">
                <cfset a=a&testme[lenx]>
          </cfloop>
          <cfloop index="Lenx" from="23552" to="#ArrayLen(Testme)#">
                <cfset b=b&testme[lenx]>
          </cfloop>

          <cfset c=a&b>
          <cffile action="write" file="#CurrentDir#new.doc" output="#c#">

My resulting file is just a bunch of numbers?   If I am reading from binary 
shouldn't it stay as binary? What am i doing wrong                          


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:292407
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to