InplaceExeWrapper for those tools that do not allow specifying an output file – twm’s blog
Posted by jpluimers on 2019/12/17
In my bin
directory from [WayBack] InplaceExeWrapper Project Top Page – OSDN: [WayBack] InplaceExeWrapper for those tools that do not allow specifying an output file – twm’s blog:
There are a lot of command line tools that are very useful, but have one flaw: They directly modify a file in place and do not allow you to specify an output file instead.
…
Enter InplaceExeWrapper which called as
InplaceExeWrapper --expectfilenameonstdout c:\path\to\dprojnormalizercmd.exe input.dproj output.dproj
does the following:
- Create a temporary directory under
%TEMP%
- Copy the input file
input.dproj
there- Call the tool as
dprojnormalizer tempfile.dproj
- Copy the modified file to the output file
output.dproj
- Delete the temporary directory
So basically it replaces the missing functionality of specifying an output file for the tool it calls.
Here is the full help on command line parameters and options:
Synopsis: InplaceExeWrapper [options] Executable InFile [OutFile] Parameters: Executable : Executable to call (if set to "copy" we only copy InFile to OutFile) InFile : input filename OutFile : output filename, defaults to infile Options: --CheckResult=value : If set, the executable must return the value given for this option (must be a number) --debug : if given, some debug output is written to error.txt in the temp directory and the temp directory will not be deleted. --ExpectFilenameOnStdout : if set, the output of the executable must contain the filename --help -? -h -H : display parameter help --ShowCmdLine : Show command line as passed to the program. --StartupLog=value : Write a startup log to the given file. --TempDir=value : directory to use for temporary files (must exist) --toStdOut : if set, output is written to stdout and infile is not changed
Via [WayBack] There are a lot of command line tools that are very useful, but have one flaw: They directly modify a file in place and do not allow you to specify an o… – Thomas Mueller (dummzeuch) – Google+
–jeroen
Anna Kristensen said
Another useful feature is comparing two snapshots. For example, a developer realizes that a process constantly consumes memory and does not give it back, or the number of GDI objects increases and increases. One could just get a snapshot and explore it, but it is much more convenient to get the first (base) snapshot, then give the process some time to allocate new resources. Finally get a new snapshot and look at its difference with the base snapshot. Thus, the difference between snapshots allows to see new allocations, and of great importance is the number of Hit Count that indicates that they are allocated at the same place in the code.
jpluimers said
That is indeed an interesting concept (which I actually use for resource monitoring; I actually wrote a small library and parser called Korsakov in the Turbo Pascal era for this).
But how is that related to
InplaceExeWrapper
?