revCopyFolder Command

Eric Chatonet eric.chatonet at sosmartsoftware.com
Wed Jan 11 13:08:16 EST 2006


Hi Gregory,

Yes :-(
But what would you not use revCopyFolder?
The following function (by Frederic Rinaldi) might help you:

function AllFiles pFolder,pAddFullPath,pAllInfos
   local tStarpFolder
   -----
   set cursor to busy
   if last char of pFolder <> slash then put slash after pFolder
   if tStarpFolder is empty then put pFolder into tStarpFolder
   -----
   set the defaultFolder to pFolder
   if the result <> empty then
     beep
     answer error "Could not find" && pFolder titled "Error"
     exit to top
   end if
   -----
   put the detailed files into filesList
   filter filesList without ".*"
   filter filesList without "Icon%0D*"
   filter filesList without "*,MACSfdrp" -- remove folder aliases
   -----
   put the folders into foldersList
   filter foldersList without ".*"
   -----
   repeat for each line loopFolder in foldersList
     put AllFiles(pFolder & loopFolder & "/",pAddFullPath,pAllInfos)  
& return after resultList
   end repeat
   -----
   repeat with i=number of lines of filesList down to 1
     set cursor to busy
     if pAddFullPath then put MyURLEncode(pFolder) before line i of  
filesList
     if not pAllInfos then put item 1 of line i of filesList into  
line i of filesList
   end repeat
   -----
   put resultList & filesList into tFinalList
   sort lines of tFinalList
   return word 1 to -1 of tFinalList -- strip empty lines
end AllFiles
------------------------------------
function MyURLEncode what
   put URLEncode(what) into what
   replace "%2F" with "/" in what
   return what
end MyURLEncode


Le 11 janv. 06 à 19:02, Gregory Lypny a écrit :

> 	Would the alternative to using the revCopyFolder command be to  
> drill down through all of a folder's sub-folders and use "put url"  
> to make individual copies of the files?

Best Regards from Paris,
Eric Chatonet
------------------------------------------------------------------------ 
----------------------
http://www.sosmartsoftware.com/    eric.chatonet at sosmartsoftware.com/





More information about the use-livecode mailing list