How to put the text of several TXT files in just one text field with a single mouseclick?

Mark Smith lists at futilism.com
Thu Feb 5 05:39:50 EST 2009


William, assuming you have the path for the folder in a variable "tFo"

on mouseUp

   put the defaultFolder into tOldFo -- so we can set the default  
back when we've finished
   set the defaultFolder to tFo
   put the files into tFileList
   filter tFileList with "*.txt"
   repeat for each line L in tFileList
      put url ("file:" & L) & cr after fld "theField"
   end repeat

   set the defaultFolder to tOldFo
end mouseUp

best,

Mark

On 5 Feb 2009, at 10:33, William de Smet wrote:

> Hi there,
> Say I have several .TXT files in a directory and I want the  
> contents of them
> all to be shown in just one text field with just one mouseclick.
> I know how to do this with one .TXT file but not with say 30 files.
> And all these files have different names.
>
> Any idea's or scripts are welcome!
>
> Greetings,
>
> William
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list