[Mono-list] Problem with System.Diagnostics.Process and cat
support
support at amsoftwaredesign.com
Mon Jun 23 16:26:02 EDT 2008
Will Murnane wrote:
> On Mon, Jun 23, 2008 at 13:00, snorkel01 <support at amsoftwaredesign.com> wrote:
>
>> /bin/cat: >: No such file or directory /bin/cat:
>> /1001/temp/admsfx_23847.exe: No such file or directory
>>
> The '>' is shell syntax, not cat syntax, and you're not spawning a
> shell. You need to either spawn a shell which runs cat (expensive) or
> just do the concatenation yourself (cheap, fast).
>
> Will
>
>
Hi,
Thanks for the info, I didn't realize that I had to run the shell, was
porting some PHP code and figured it was similar.
Anyway, I did the concatenation with two filestreams and it works fine.
int readCount=0;
byte[] buffer = new byte[1024];
FileStream stubstream = new FileStream(newSFXFilename, FileMode.Append);
FileStream zipstream = new FileStream(zipfilename, FileMode.Open);
while ((readCount = zipstream.Read(buffer, 0, buffer.Length)) != 0)
stubstream.Write(buffer, 0, readCount);
stubstream.Close();
zipstream.Close();
Later,
Snorkel
More information about the Mono-list
mailing list