6
1
I have a command such as "C:\Program Files\7-zip\7z.exe" x foo.7z -y
which will extract (with full paths) to the current directory.
What it does that I don't want, though, is to spool out the individual paths to stdout. This is information that I don't need.
However, on Windows, redirecting this to NUL (the equivalent of /dev/null
on Linux) a la "C:\Program Files\7-zip\7z.exe" x foo.7z -y > NUL
produces no unzip'd files, because 7-Zip seems to unzip to NUL instead of pushing the command text-output to NUL (which is what we want).
Actually, that command works from a Windows command shell (that is, it unzips the files as I want but without logging text to the console), but ir doesn't from TeamCity's agent execution within its command-line build-runner (that is, it unzips into NUL).
How do I get it to do the same thing within TeamCity (which is executing as a service)?
Thanks; that worked (although I don't really know why). – Peter Mounce – 2011-05-11T22:46:49.373
@Peter: TeamCity is likely actually executing it with the argv [... "-y", ">", "NUL"] or otherwise executing the file "C:\Program Files\7-Zip\7z.exe x foo.7z...". – Hello71 – 2011-05-12T00:02:21.007
Ah, yes; that would make sense. It has one textbox to take the exe, and one to take the arguments. – Peter Mounce – 2011-05-12T00:08:30.377