Re: Problem with updating HTML files in LiveCode
Posted: Thu Dec 05, 2013 8:07 am
post your code
Questions and answers about the LiveCode platform.
https://forums.livecode.com/
Code: Select all
on mouseUp
if the environment = "development" then touchEnd 1
send unZip to me in 0 milliseconds
end mouseUp
command unZip
put specialFolderPath("documents") & "/Content.zip" into TempFile
put specialFolderPath("documents") & "/Contents" into TargetFile
revZipOpenArchive TempFile, "read"
answer the result
put RevZipEnumerateItems(TempFile) into tList
repeat for each line i in tList
if i = empty then
next repeat
end if
--HERE IS THE FOLDER CODE
if the last char of i ="/" then
create folder (TargetFile & i)
next repeat
end if
--END
revZipExtractItemToFile TempFile, i, (TargetFile & i)
end repeat
revZipCloseArchive TempFile
delete file TempFile
end unZip
Is that correct?put specialFolderPath("documents") & "/Content.zip" into TempFile
put specialFolderPath("documents") & "/Contents" into TargetFile
the TargetFile is in the documents' folder "Contents" folder and the folder name that I want to unzip is in the documents folder of zip file "Content.zip" already. Is that correct?Simon wrote:Is that correct?put specialFolderPath("documents") & "/Content.zip" into TempFile
put specialFolderPath("documents") & "/Contents" into TargetFile
Code: Select all
put (specialFolderPath("engine") & "/Content.zip") into filePath
put url ("binfile:" & filePath) into destFilePath
put destFilePath into url ("binfile:"& (specialFolderPath("Documents") & "/Content.zip")) I hate to repeat myself, but this obviously still applies:TKYTKY wrote:answering the result gives me "ziperr, Can't open file: No such file or directory".Code: Select all
on mouseUp if the environment = "development" then touchEnd 1 send "unZip" to me in 0 milliseconds end mouseUp command unZip put specialFolderPath("documents") & "/Content.zip" into TempFile put specialFolderPath("documents") & "/Contents" into TargetFile revZipOpenArchive TempFile, "read" answer the result put RevZipEnumerateItems(TempFile) into tList repeat for each line i in tList if i = empty then next repeat end if --HERE IS THE FOLDER CODE if the last char of i ="/" then create folder (TargetFile & i) next repeat end if --END revZipExtractItemToFile TempFile, i, (TargetFile & i) end repeat revZipCloseArchive TempFile delete file TempFile end unZip