Skip, I used gunzip rather than gzip -d . I did notice when I ran gzip or gunzip using spawn_jtask_ without -v, I did not get any output from gzip or gunzip. There was no way I could tell if it worked or not. So, I used -v to get some output from the program.
One of the concerns I have with spawn_jtask_ is that it does not report errors well, if at all. I have an updated verb that does better, but it hasn't gotten into J7 distribution yet. fork has the same issues with no error reporting. Unless you install gzip in one of your 'pathed' directories or if the current gzip install updates the system or user PATH ENV variable, you will have to reference the complete path to gzip in a way similar to this: spawn_jtask_ 'c:\gnuwin32\bin\gzip -d ',;'c:gzip/log.gz' All the best, -- David Mitchell On 11/4/2011 13:15, Skip Cave wrote: > Before I get too involved with traversing the directory tree, I just need > to be able to create a function that unzips a .gz file from J. > > Here's my scenario: > > I have a directory right off C: called "Gzip: where I installed the > open-source gzip program. The gzip option I need is "-d" for "decompress" > > I put one of my "log.gz" files in that same gzip directory. > > Here is a command line expression I used, which works to expand my test > log.gz file: > > In the command window, first I set the directory to the Gzip directory: > > C:> cd gzip > C: Gzip> > > Then I enter the command: > C: Gzip> gzip -d -v (-v is for verbose) > log.gz 92.3% -- replaced with log > > C:Gzip> > > This worked, and the original log.gz file was replaced with the > uncompressed log file. I would prefer to NOT have a replacement happen. > Creating a new file with no extension, or a different extension would be > better. Unfortunately, the gzip utility appears to not have a 'don't > replace' option. But at least I got the file unzipped. > > However, when I tried this in J 6.02: > spawn_jtask_ 'gzip -d ',;'c:gzip/log.gz' > > nothing happened. No error messages, nothing. And no unzipped file > > I also tried: > fork 'c:\Gzip\gzip -d log.gz' > > Still nothing. > > What am I doing wrong? > > Skip > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm