Can I use the command line, or run a batch file from managed code? (.NET)
Just like the subject states. I want to be able to run iisreset, batch files, etc. from the a console application. Can I/How do I do it? Thanks, Kyle ...
Just like the subject states. I want to be able to run iisreset, batch files, etc. from the a console application. Can I/How do I do it? Thanks, Kyle ...
I'm trying to mirror files on FTP server. Those files can be very large so downloads might be interrupted. I'd like to keep the original files while downloading partial files to a temporary folder and once completed override local older versions. Can I do this? how? Is there another easy to use (command line) tool that I can use? ...
This is a batch file in Windows. Here is my .bat file @echo off copy "C:\Remoting.config-Training" "C:\Remoting.config" "C:\ThirdParty.exe" This works fine except the .bat file leaves the command window open the whole time the "ThirdParty" application is running. I need the command window to close. I would use the short-cu...
In order to extend my "grep" emulator in Perl I have added support for a -r switch which enables recursive searching in sub-directories. Now the command line invocation looks something like this: perl pgrep.pl -r <directory> <expression> Both -r and the directory arguments are optional (directory defaults to '.'). As of now I simply c...
I'm building a Web app to allow users to view and manipulate data, particularly numeric and geographic data. It's important that the output be clear and professional (data grids, Google Map overlays, etc.). But in terms of the user interface, I'd rather start with the flexibility of a command-line interface before building GUI-style form...
I am feeling surprised by the difference between two seemingly identical scripts. first.ps1: "A" if ($true) { "B" } "C" second.ps1: "A" if ($true) { "B" } "C" Now open a CMD window, and run these scripts like this: powershell - < first.ps1 powershell - < second.ps1 first produces: A B C while second produces jus...
I have a DOS batch script that invokes a java application which interacts with the user through the console UI. For the sake of argument, let's call it runapp.bat and its contents be java com.example.myApp If the batch script is invoked in a console, everything works fine. However, if the script is invoked from the Window Manager, the...
How can I write to parallel port through Windows XP command line? ...
when you run a script (such as vbscript) from 25*80 (full screen mode of dos prompt) and that your script call a windows application (such as notepad), at the end of the operation, focus remains on the desktop (although "command prompt" at the taskbar minimized and wait for only one "{enter}" to go back in 25*80 full screen command promp...
I'm trying to run the following command: find . -iname '.#*' -print0 | xargs -0 -L 1 foobar where "foobar" is an alias or function defined in my .bashrc file (in my case, it's a function that takes one parameter). Apparently xargs doesn't recognize these as things it can run. Is there a clever way to remedy this? ...
Hello, I am running a long program in a remote machine, and I want to stop it, but my problem is that if I use the kill command then the program will exit without saving results. Normally what I do to finish the program is using ctrl c and in that case the program saves the results, but right now I am not in the machine that is running ...
I can understand cmd but not /c. I was trying to invoke a java program from the current for which I use Runtime.getRuntime().exec("cmd /C java helloworld") There arises my doubt. ...
A quick couple of Cygwin questions that I am not quite sure how to search in order to find the answer myself: Question: When I run which perl on my cygwin installation, it doesn't point to my pre-installed windows installation, it points to the cygwin one. How can i change it so it points to my windows based perl installation: /cygd...
Okay here's the program I have typed up(stdio.h is included also): /* function main begins program execution */ int main (int argc, char *argv[]) { int x; /*first number input*/ int y; /*second number input*/ int sum; /* variable in which sum will be stored */ int product; /* variable in which product will be stored */ ...
I want to distribute a command-line application written in Java on Windows. My application is distributed as a zip file, which has a lib directory entry which has the .jar files needed for invoking my main class. Currently, for Unix environments, I have a shell script which invokes the java command with a CLASSPATH created by appending...
Hello all, Objective: Make a progress bar where users can check how much of a file has been downloaded by my server. Scenario:I have a PHP script that executes a python script via popen. I have done this like so: $handle = popen('python last', 'r'); $read = fread($handle, 4096); pclose($handle); This python script outputs to the s...
As an example i want to run the following command under a rake. robocopy C:\Media \\other\Media /mir The rakefile i was able to get working was def sh(str) str.tr!('|', '\\') IO.popen(str) do |pipe| pipe.each do |line| puts line end end end task :default do sh 'robocopy C:|Media ||other|Media /mir' end Howeve...
I need to execute a PowerShell script from within C#. The script needs commandline arguments. This is what I have done so far: RunspaceConfiguration runspaceConfiguration = RunspaceConfiguration.Create(); Runspace runspace = RunspaceFactory.CreateRunspace(runspaceConfiguration); runspace.Open(); RunspaceInvoke scriptInvoker = new Run...
We are currently using a single command line tool to build our product on both Windows and Linux. Si far its works nicely, allowing us to build out of source and with finer dependencies than what any of our previous build system allowed. This buys us great incremental and parallel build capabilities. To describe shortly the build proce...
I have a PHP script which executes a shell command: $handle = popen('python last', 'r'); $read = fread($handle, 4096); print_r($read); pclose($handle); I echo the output of the shell output. When I run this in the command I get something like this: [root@localhost tester]# python last [last] ZVZX-W3vo9I: Downloading video webpage [la...