command-line

Can a WinForm execute a console program? If so, how?

Duplicate: http://stackoverflow.com/questions/240171/launching-a-application-exe-from-c/240189#240189 Hi folks, i have a free command line tool called FW Tools. Works great. Here is a sample line i enter in the console window :- ogr2ogr -f "ESRI Shapefile" -a_srs "EPSG:26986" -t_srs "EPSG:4326" towns_geodetic.shp TOWNSSURVEY_POLY....

How to use \L DOS command for creating Log file in SSIS

Hi, I'm trying to use the below command to execute for generating the log file for SSIS package. DTExec /FILE "C:\Documents and Settings\CP0808\My Documents\Test.dtsx" /logger "DTS.LogProviderTextFile;c:\log.txt" But it got the error as below. Please advise. Started: 12:03:20 AM Error: 2009-05-04 12:03:21.15 Code: 0xC001000E ...

How do I pass command line arguments to a rake task?

I've got a rake task that I am making that needs to insert a value into multiple databases. I'd like to be able to pass this value into the rake task from the command line, or from another rake task, how can I do this? ...

OpenSolaris: Remove user from a group from command line

How can I remove a user from a group from the command line in OpenSolaris (2008.11)? I know I can define a user's primary group and a add a user to a group with: usermod -g primarygroup user usermod -G group_list user What's the corresponding command to undo that action and remove a user from the group without just editing /etc/group...

Launch a webpage on a Firefox (win) tab using Python

Hi, I'm trying to launch a website url in a new tab using python in that way, but it didn't worked in these both ways: Method 1: os.system('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/'); and Method 2: os.startfile('C:\Program Files\Mozilla Firefox\Firefox.exe -new-tab http://www.google.com/'); If ...

Correct way to implement C# console application?

What is the correct way to implement and architect a command line tool as a C# console application? Concerns to address include proper parsing of command line variables, and the proper way to output text. While Console.WriteLine() is the most obvious choice for output, what are the circumstances in which one should instead opt to write...

Command Line CD (Change Directory) variant in C#?

I want to write a simple C# console application to change the current directory of the command line to a directory the application works out. Looking through MSDN System.IO.Directory.SetCurrentDirectory looks ideal for this until I saw in the remarks that: 'When the application terminates, the working directory is restored to its ...

Windows command line tool analagous to UN*X "tail" command?

Hi, The tail command on the DOS does not seem to be recognized on my XP. Any suggestions on printing last few lines on a very big log file on DOS. Thanks Arun ...

Is `xargs -t` output stderr or stdout, and can you control it?

say i have a directory with hi.txt and blah.txt and i execute the following command on a linux-ish command line ls *.* | xargs -t -i{} echo {} the output you will see is echo blah.txt blah.txt echo hi.txt hi.txt i'd like to redirect the stderr output (say 'echo blah.txt' fails...), leaving only the output from the xargs -t command w...

firefox proxy settings via command line

How do I change Firefox Proxy settings via command line on windows xp/2k? Thanks ...

Program to show a "toast" notification popup from the Windows command line?

I have a monitoring script that I'd like to pop up a "toast window" when it detects that something happens. Is there a simple executable available that I can just run to do this? I know it's relatively east to write such a thing, but I'd rather just use an existing program if there's one available. ...

Robust and friendly command line tools for .NET?

Forget fancy shmancy web stuff. I'm looking for a good .NET CLI argument processing utility, prefer open source code. This is for quick and dirty utilities that need robust and friendly command line argument handling. These are utilities with maybe a day of effort in them. Investing a few days writing good command line handling seems o...

How do I untar a subdirectory into the current directory?

How to I extract a subdirectory in a tarball into the current directory? Example, the tarball from wordpress: wordpress/ wordpress/wp-trackback.php wordpress/wp-config-sample.php wordpress/wp-settings.php wordpress/wp-rss2.php wordpress/readme.html wordpress/index.php ... How do I extract everything under wordpress/ into the current ...

How to read Unicode characters from command-line arguments in Python on Windows

I want my Python script to be able to read Unicode command line arguments in Windows. But it appears that sys.argv is a string encoded in some local encoding, rather than Unicode. How can I read the command line in full Unicode? Example code: argv.py import sys first_arg = sys.argv[1] print first_arg print type(first_arg) print first_...

How to pass in credentials when connecting to sonatype nexus (anonymous login disabled) ?

In eclipse, the m2eclipse plugin will prompt me for my credentials when I'm building a maven2 project. And it compiles fine. But if I now try to run "mvn install" from the command line, I get an artifact not found error. How do I add the username/password into my pom.xml in order to solve this problem. Thanks ...

Implementing "app.exe -instruction file" notation in C++

Greetings. I have a project for my Data Structures class, which is a file compressor that works using Binary Trees and other stuff. We are required to "zip" and "unzip" any given file by using the following instructions in the command line: For compressing: compressor.exe -zip file.whatever For uncompressing: compressor.exe -unzip...

How do I create a command line frontend for a GUI Cocoa app?

I'm creating a mainly GUI Cocoa app, but I want to create a command line front end as well that prints the same data so I can display it using geektool. I'm guessing I need to create an additional command line custom executable in my Xcode project and build it alongside the GUI executable? Is there a tutorial around for how to do this? ...

Piping in a file on the command-line using System.Diagnostics.Process

I'm trying to run a command-line program and piping in a file. The command works fine on the command-line, but I can't seem to get it to work with the Process object in C#. Here's the command I'm issuing: "C:\Servers\CollabNet Subversion Server\svnadmin" load C:\Repositories\TestLoad < C:\Temp\test.dump This function works fine with al...

Command line progress bar in Java

I have a Java program running in command line mode. I would like to display a progress bar, showing the percentage of job done. The same kind of progress bar you would see using wget under unix. Is there a library to make this possible ? ...

Can grep (from command line) be set up to highlight the part of the line that matches?

I'm using grep from the command line via cygwin. I'm wondering if there's any way to get it to highlight the part of each line that matches the regex. The closest thing I'm seeing is the -o option, but that only outputs the matching area, and I'd like to see the entire line. ...