WatchDirectory home page
WatchDirectory Startseite (Deutsche Version)
Site WatchDirectory (Français)
  Welcome, Guest. Please Login or Register
YaBB - Yet another Bulletin Board
   
  HomeHelpSearchLoginRegister  
 
Page Index Toggle Pages: 1
UnZip (Read 6190 times)
shawnmullen
YaBB Newbies
*
Offline



Posts: 5
UnZip
Mar 11th, 2008 at 8:41am
 
I am evaluating watchDirectory.  I am not sure this is a bug.  When a file is unzipped it's file attribute is set to read-only.  How do you prevent this?
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: UnZip
Reply #1 - Mar 11th, 2008 at 12:12pm
 
Hello Shawn,

I just did a few tests and can not really reproduce this. I am assuming you really mean the read-only attribute, and not the "file security" attributes..
If you *do* mean the security attributes (shows when you right-click the file, properties, security), you should make sure the "file security" window of your task is set to "Allow Everyone" (see attached picture).

Gert
Back to top
 

filesec.png (28 KB | )
filesec.png

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
shawnmullen
YaBB Newbies
*
Offline



Posts: 5
Re: UnZip
Reply #2 - Mar 11th, 2008 at 6:03pm
 
I am not talking about the file security setting.  I am talking about the file attribute (ex. Read-Only, Hidden, etc).  When watchDirectory unzips a file the files being written onto the disk have their Read-Only attribute set to true.
Back to top
 
 
IP Logged
 
shawnmullen
YaBB Newbies
*
Offline



Posts: 5
Re: UnZip
Reply #3 - Mar 12th, 2008 at 4:51am
 
Any ideas?  If watchDirectory does not work, I'll have to develop my own solution and I really don't want to.

Thanks.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: UnZip
Reply #4 - Mar 12th, 2008 at 8:31am
 
Hi,

Like I said, I am not able to reproduce this currently.
Can you please "right click" the task while it is not running, and select "backup selected task". Please send the backup and an example ZIP file that causes the problem to me (gert at watchdirectory.net).

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
shawnmullen
YaBB Newbies
*
Offline



Posts: 5
Re: UnZip
Reply #5 - Mar 12th, 2008 at 3:58pm
 
Here it is.  I don't have small enough pdf to send in this zip file.  However, I am not sure it matters.  If I unzip the file with the pdf in it using PKZip, the readonly attribute is not set to true.  If watchDirectory unzips the same zip file containing the same pdf, the pdf file's readonly attribute is set to true.

modified by Gert: removed the zip from your post
Back to top
« Last Edit: Mar 12th, 2008 at 8:24pm by Gert »  
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: UnZip
Reply #6 - Mar 12th, 2008 at 8:24pm
 
Okay, I have tried it with your task (I removed it from your post again).
When I put a zip in the folder, the unzipped file has no read-only attribute, even when it has a read-only attribute inside the zip...
Perhaps there is some other process setting the read-only attribute?

Alternatively, you can use your pkzip's commandline option with the "automatically run a bat file" task to do the unzipping.
I am not sure about the commandline of pkzip, but I guess you call it something like this:
Code:
"c:\program files\pkware\pkzip.exe" -unzip "%WD_FILE%" -directory "%WD_FILE_D%"
 


(-unzip and -directory are switches made up by me, check your pkzip documentation)
%WD_FILE% is an environment variable that contains the full path of the detected file (the zip)
%WD_FILE_D% has just the directoryname where the zip is found.
Other variables are here: http://www.watchdirectory.net/wdhelp/plugins/wdopAutoRunBatEnv.html

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
shawnmullen
YaBB Newbies
*
Offline



Posts: 5
Re: UnZip
Reply #7 - Mar 14th, 2008 at 9:32pm
 
I finally figured it out.  I am using SharpZipLib to zip the files.  The current version uses Zip64 extensions and it has this feature turned on by default.  Once I turned it off, watchDirectory was able to properly unzip the file.  This may be a good thing to add for a future release.  watchDirectory needs to be able to inturpret zip64 extensions properly.

Thanks again for all your help.
Back to top
 
 
IP Logged
 
Gert
YaBB Administrator
*****
Offline



Posts: 2225
The Netherlands
Re: UnZip
Reply #8 - Mar 15th, 2008 at 12:01am
 
Can't say I have heard of SharpZipLib or zip64 before, but thanks for letting me know.

One of our previous releases made a switch from ZLIB to Chilkat for the ZIP component (mostly because Chilkat supports encryption). We plan to also switch to Chilkat  for our unzip component, not sure if that will help, but I hope it will.

Glad you have found a work-around.

Gert
Back to top
 

Gert Rijs - gert (at) gdpsoftware (dot) com
Blog: http://blog-en.gdpsoftware.com/
End Alzheimer's: http://www.alz.org&&...
WWW WWW GdPSoftware  
IP Logged
 
Page Index Toggle Pages: 1