10301


10301

Postby tmosa on Fri Aug 06, 2004 1:12 pm

Hi all,
i"m trying to zip all files and folders in a given folder but i"get
"Error: Error - no files to zip!" ..
Everything seems OK to me but doesn"t work..I couldn"t find the reason.
Please help!

Here is my code
----ooOOoo-----

dim ZIP
set ZIP = server.createobject("aspZip.EasyZIP")
ZIP.Debug = False

Zip.ArgsClear

Zip.Temp = Server.MapPath("../temp/"& mfolder)
Zip.RootDir = Server.MapPath("../temp/"& mfolder)
Zip.ArgsAdd("*.*")
Zip.AddOptions = AddRecurseDirs + AddSeparateDirs + AddDirNames
Zip.ZipFileName = Server.MapPath("../temp/"& mfolder) & ".zip"
Zip.Zip

if ZIP.Error <> 0 then
response.Write "Error: " & ZIP.LastMessage
else
response.Write ZIP.SuccessCnt & " files added to zip file"
end if
tmosa
 
Posts: 2
Joined: Fri Aug 06, 2004 12:58 pm
Location: Turkey

Postby John on Fri Aug 06, 2004 1:27 pm

Do not include the zip file in the same directory to zip the files, use a different path.
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain

Postby tmosa on Sat Aug 07, 2004 12:35 am

they are not in the same folder,

lets say mfolder=230_06082004132827

target files will be collected from C:InetpubwwwrootWebSunum emp230_06082004132827

ZipFileName will be located under temp
C:InetpubwwwrootWebSunum emp230_06082004132827.zip
tmosa
 
Posts: 2
Joined: Fri Aug 06, 2004 12:58 pm
Location: Turkey

Postby John on Tue Aug 10, 2004 12:02 pm

Set the debug and debugdll property to true and post the results. This will help us to trace the error.

ZIP.Debug = TRUE
ZIP.DebugDLL = TRUE
John
 
Posts: 1313
Joined: Wed Oct 31, 2001 10:23 am
Location: Spain


Return to Zip

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Fatal error: Not able to open ./cache/data_global.php in D:\Hosting\6480136\html\ForosBB3\includes\acm\acm_file.php on line 106