I need a batch file that receives two parameters: a command (filename with some arguments) and a path to a file - for output redirection of the command execution.
I tried some variants like call %1 > %2
, start %1 > %2
in file 'q.cmd', with calling as q "echo test" "log.txt"
and q 'echo test' 'log.txt'
and %1
or call %1
with q "echo test > log.txt"
but nothing works. I also tried it with ^
before >
. In most cases it prints " 'echo is not recognized as an internal or external commad..." or something like this and sometimes create empty 123.txt or with some service lines, but not with "test" as I need. How can I solve the problem?
Sunday, December 16, 2018
windows - CMD file for redirection of child process output
Subscribe to:
Post Comments (Atom)
hard drive - Leaving bad sectors in unformatted partition?
Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...
-
Using Windows 7. When I RDP to a PC I'd like to be able to logout of the session without the screen reverting to a Ctrl+Alt+Del Login sc...
-
I tried adding grubx64.efi in the Windows Boot Manager using BCDEdit. However when I boot up my computer and try to start GRUB from Windows ...
-
So I installed Ubuntu Netbook Remix 9.10 onto my Asus EeePC 1008HA netbook. It worked perfectly and was pretty quick. Restarting, suspending...
No comments:
Post a Comment