Problem with updating HTML files in LiveCode
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: Problem with updating HTML files in LiveCode
post your code
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problem with updating HTML files in LiveCode
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
Re: Problem with updating HTML files in LiveCode
Is that correct?put specialFolderPath("documents") & "/Content.zip" into TempFile
put specialFolderPath("documents") & "/Contents" into TargetFile
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problem with updating HTML files in LiveCode
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
Re: Problem with updating HTML files in LiveCode
Don't see any code to move it from the engine.
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problem with updating HTML files in LiveCode
Oh it's in another card and the Content zip file is already in my documents folder alr.
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"))
Re: Problem with updating HTML files in LiveCode
It's from the same card the button is at and it's at the opencard of it.
Re: Problem with updating HTML files in LiveCode
You trying to hurt yourself?
the "s" again
the "s" again
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problem with updating HTML files in LiveCode
Haha nope. The zip file is named "Content.zip" and the folder is Contents. Because Content.zip is being "copy files" into already individually.
Re: Problem with updating HTML files in LiveCode
haha...
What?
What?
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problem with updating HTML files in LiveCode
Is it confusing? haha. Meaning I have in the documents folder "Content.zip" and a folder named "Contents" where I want to put three of my folders inside the zip file into the folder "Contents"
Re: Problem with updating HTML files in LiveCode
haha
haha
haha
haha
haha
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: Problem with updating HTML files in LiveCode
So now the only thing I have to ask is just how to unzip a zip file. I have 3 folders to unzip in the Documents folder. I only need to unzip it into a "Contents" folder inside the documents folder and that's all already. Any help? 
Thanks
Jeremy

Thanks
Jeremy
Re: Problem with updating HTML files in LiveCode
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
http://forums.runrev.com/phpBB2/viewtop ... =15#p91727
