Log all the paramters when making your cfexecute call, and whether it 
successfully created the file or not.  Then look at both lists (the ones 
that worked, and the ones that didn't), and I'll bet a pattern will 
emerge.   Spaces or bad characters in a filename perhaps?  Surround the 
filenames with double quotes.

Or perhaps output over a certain size is failing?  I haven't seen it 
done the way you are doing it there (not that its wrong), passing the 
binary data through coldfusion by using the outputfile attribute.  What 
attributes are you passing to gzip?  By default it deletes the file you 
are compressing, so this should work:

<cfexecute name="/bin/gzip" arguments="""#pathtofile#""" />

This should create a new file named #pathtofile#.gz, and the original 
#pathtofile# will have been deleted.

-Ryan

Josh Nathanson wrote:
> Hey all,
>
> I'm trying to do a little CFEXECUTE magic on a Linux box, gzipping an xml 
> file on the fly.
>
> All is well except that the resulting file is occasionally empty.  It seems 
> to work about 50% of the time, then the other 50% I get an empty .gz file.
>
> My code looks like this:
> <cfexecute name="#pathtogzip#" arguments="#pathtofile#" 
> outputfile="#pathtofile#.gz">
> </cfexecute>
>
> The paths are all correct -- as I mentioned it does work about half the time 
> so there are no path or permission issues.
>
> I also tried adding in the arguments -f (force) and -q (quiet), but it 
> doesn't seem to make a difference.
>
> Any thoughts?
>
> -- Josh
>   



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:299135
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to