command-line

How to run a console application with command line parameters in Visual C++ 6.0?

I've got a console application that compiles and executes fine with Visual C++ 6.0, except that it will then only get as far as telling me about missing command line parameters. There doesn't seem to be anywhere obvious to enter these. How do I run or debug it with command line parameters? ...

Pausing after debugging command line application in Visual Studio

Is there a way short of writing a seperate batch file or adding a system call to pause or getch or a breakpoint right before the end of the main function to keep a command window open after a command line application has finished running? Put differently, is there a way in the project properties to run another command after running the ...

How can I update a progress display on a Perl command-line application?

I have a little Perl script (On Windows) that checks some files for me as an aid to my day-to-day business. At the moment it prints out something like... 0% 25% 50% 75% Complete But I can remember scripts I've used in the past that didn't print progress on a line-by-line basis, but which updated the output on the display, presumably b...

How to capture and display output from a task via Windows CMD

Hi, I've got a PHP script which I'm running from a command line (windows) that performs a variety of tasks, and the only output it gives is via 'print' statements which output direct to screen. What I want to do is capture this to a log file as well. I know I can do: php-cli script.php > log.txt But the problem with this approach...

Eclipse: Add Command-Line Args to an OS X .app Directory

Is it possible to add custom command-line arguments to an Eclipse .app folder? In my particular case, I'm working with ZendStudio. I'm assuming the base Eclipse release would behave the same way. I've found what looks like two different places that could work, but neither yield any results: ZendStudio.app\Contents\info.plist ZendStudio...

How can I change the format of a date from the command line?

What's the quickest way to convert a date in one format, say 2008-06-01 to a date in another format, say Sun 1st June 2008 The important bit is actually the 'Sun' because depending on the dayname, I may need to fiddle other things around - in a non-deterministic fashion. I'm running GNU bash, version 3.2.17(1)-release (i386...

How to get cmd line build command for VS solution?

This is probably easy but I am getting stuck: when I build a solution in Visual Studio - how do extract the exact cmd line for the current build command in order to be able to do the same build from VisualStudio console? In the output window I can see the single projects in the solution build commands but not the one for the whole solu...

Simple DOS command-line to ignore data on a line after the last backslash

I'm creating a batch file to make multiple directories from a list in a text file however after the directory is listed sometimes a filename is as well. Is there an easy way to have it ignore all data after the last \ on a line? ...

How do I send ctrl+c to a process in c#?

I'm writing a wrapper class for a command line executable. This exe accepts input from stdin until i hit ctrl+c in the command prompt shell, in which case it prints output based on the input to stdout. I want to simulate that ctrl+c press in c# code, sending the kill command to a .Net process object. I've tried calling Process.kill(),...

How to persuade ascmd.exe to make tables as output, not a XML file?

Hello, I'm trying to see data in my OLAP cube by ascmd utility. As input I put a MDX query, but only what I have as output (in command line) is a XML file. I tried to use -Tf text and -Tf csv parameters, but they don't work in the way I think they should (I have a XML on output all the time). I want to have on my output something like...

Schedule a .vbs file to run in Windows

I have a VBScript script that starts a cmd prompt, telnets into a device and TFTP's the configuration to a server. It works when I am logged in and run it manually. I would like to automate it with Windows Task Scheduler. Any assistance would be appreciated, here is the VBScript script: set WshShell = WScript.CreateObject("WScript.Shel...

Can I print html files (with images, css) from the command-line?

I want to print styled html pages with their images from a script. Can anyone suggest an open-source solution? I'm using linux (Ubuntu 8.04) but would be also be interested in solutions for other operating systems. ...

Subversion: commit only modified files

I want to commit a large amount of XML files which have been modified. However, within the directory that I want to recursively search through, there are many folders/files which have been added locally, these I do not want to commit. Is there a way to do this on the command line? Update: I should have included the SVN version info: sv...

Windows default size for console application

While testing a console app, I set the properties of the console window to be only 3 lines high. This change has somehow stuck, meaning that new console windows default to 3 lines high. If I create a new shortcut on the desktop, and point it to cmd.exe, the window that opens is 3 lines high. Of course, I can alter this value using th...

How do you split a file base on a token?

Let's say you got a file containing texts (from 1 to N) separated by a $ How can a slit the file so the end result is N files? text1 with newlines $ text2 $etc... $ textN I'm thinking something with awk or sed but is there any available unix app that already perform that kind of task? ...

How do I call a Windows shell command using VB6?

How exactly using VB6 can I can call any Windows shell command as you would from the command-line? For example, something as trivial as: echo foo ...

Java Command Line Trouble with Reading a Class from a Jar Archive

I am trying to run a java based tool using a command line syntax as the following: java -cp archive.jar archiveFolder.theMainClassName.Although the class I am searching for, a main class, "theMainClassName" is in the archive.jar and in the archiveFolder given at input, I keep getting the error that my class is not seen. Does anybody have...

zcat won't unzip files properly

Hi, I need to unzip a compressed file on the fly in my program. It works when I try it on my own linux computer, but for some reason the school computers fail whenever I tell them to do it. To unzip I'm using the following command: zcat /file/address/file.tar.gz and get the error: /file/address/file.tar.gz.Z: No such file or dir...

What's the Windows equivalent of a UNIX shell script?

I want to have an executable file that will call some other programs. The way I would do this in Linux is with a simple bash script that looks like this: #!/bin/bash echo "running some-program" /home/murat/some-program arg1 arg2 What's the best way to do this kind of thing under Windows? ...

How to get file name and revision number as a list?

How to get file name and revision number as a list starting from a designated folder? ...