Using zip to package a folder with subfolders

Trevor DeVore lists at mangomultimedia.com
Wed Aug 12 22:27:39 EDT 2009


On Aug 12, 2009, at 2:37 PM, Tereza Snyder wrote:

> Thanks Trevor for your noCommentsNeededOnAccountOfLongVariableNames  
> script. The main mystery, "How do I zip a folder?" is solved!

:-)

I forgot to include one supporting function that is called:  
filesFilesInFolder. Here it is.

Regards,

-- 
Trevor DeVore
Blue Mango Learning Systems
www.bluemangolearning.com    -    www.screensteps.com

==================

function fileFilesInFolder pFolder, pFullPath, pIncludeHidden
     local theDefault,theFile,theFiles,theFullFiles

     if there is not a folder pFolder then return empty
     if last char of pFolder is not slash then put slash after pFolder

     put the defaultfolder into theDefault
     set the defaultfolder to pFolder
     put the files into theFiles
     set the defaultfolder to theDefault
     if pIncludeHidden is not true then
         filter theFiles without ".*"
     else
         filter theFiles without "..*"
     end if

     if pFullPath then
         repeat for each line theFile in theFiles
             put pFolder & theFile & cr after theFullFiles
         end REPEAT
         delete last char of theFullFiles
         return theFullFiles
     else
         return theFiles
     end if
end fileFilesInFolder

si



More information about the use-livecode mailing list