dos

Can anyone suggest a Java or Scala DOS/terminal-based UI framework?

I'm looking for some framework to build an interface like Turbo C. ...

Syntax for writing a loop inside the batch file

I am trying to write a small batch file for a task I do regularly. I have never used the for before and this is the first time I am trying this. This is what I have come with so far: for /f %i in ('ct find . -ver lbtype(%1) -print') do ct lsvt -g %i Basically it tries find all the files with a given cleracase label and then display t...

DOS Batch file include external file for variables

I have a DOS batch file and I want to include external file containing some variables(say configuration variables). Is it possible? ...

How to catch a tab press in x86 assembly?

Hi, I'm working on a project in x86 assembly on Windows (MASM), and I need to somehow catch tab presses, but I'm not sure how to do that in assembly (I'm new to it). I can get get user input with int 21h, but as far as I can tell that only works if the users types the data, then presses enter. What I need is a way so that if the user ...

Windows scheduled task

Hello everyone, I have created a Windows 7 scheduled task: schtasks /create /tn MyTask /tr C:\temp\test\MyScript.bat /sc MINUTE Problem is that this task seems to get executed by Windows but I think it can not find the running BAT script. There is a quick flash window but can't read what the problem is. On the other hand, if I plac...

How do I redirect the ouput of a command when it is executed via the DOS START command

I can not figure out how to redirect the output of an executable run with DOS START command. When I use the following: start prog.exe par1 par2 par3 > output.file only the output from the START command goes into output.file when I want the output from the prog.exe to go to output.file. prog.exe writes output to its standard output...

Shrinking or partially truncating a file in DOS/FAT

I've been tasked with writing a data collection program for a Unitech HT630, which runs a proprietary DOS operating system that can run executables compiled for 16-bit MS DOS with some restrictions. I'm using the Digital Mars C/C++ compiler, which is working well thus far. One of the application requirements is that the data file must...

Extract some data from a lot of xml files

I have cricket player profiles saved in the form of .xml files in a folder. each file has these tags in it <playerid>547</playerid> <majorteam>England</majorteam> <playername>Don</playername> the playerid is same as in .xml (each file is of different size,1kb to 5kb). These are about 500 files. What i need is to extract the playern...

WMCI - how to get the ERRORLEVEL

Hi, I want to use the "wmic" command for finding out if a specific java process is still up and running. E.g.> wmic process where "commandLine like '%ACTMonitor%' and executablePath like '%PATH1%' and name like '%java%'" The problem now is that the errorlevel of this command is always 0, no matter if there is a process listed or not. ...

How to ignore %% from being evaluated?

Hi, one of my variables has the value %val% - this is exactly the name! So: set variable=%val% What happens now is that when running the script the variable will be set to nothing as the %val% is being evaluated! But this is not what I want... How can I tell DOS to ignore the %-sign here? Can anybody out there help me with my questio...

How do I pipe the stdout of a program in DOS to a daily rolling logfile?

I've got a DOS program kicked off by a cmd script that dumps a lot of data I'd like to track in a log file. I can easily pipe it to a file - but I need a rolling logfile. Is there an easy way to pipe the output to a program that will generate a daily rolling logfile? (ie a new file is created for each day) ...

How to apply %% to a variable in a script with input parameter?

Hi, I asked a question yesterday about how to manage to get %% around a variable without getting the evaluation. Well, the thing is, it does not work that way in my case... I have a .bat file which gets an input parameter. Later on I want to use the value of this input parameter and put %...% around, like: call script.bat testValue s...

cscript - print output on same line on console?

If I have a cscript that outputs lines tothe screen, how do I avoid the "line feed" after each print? Example: for a = 1 to 10 WScript.Print "." REM (do something) next The expected output should be: .......... Not: . . . . . . . . . . In the past I've used to print the "up arrow character" ASCII code. Can this be done i...

How to check whether a file exists in C:\ drive using VC++ ?

I want to check a file is present in C drive or not..? can any one tell me how ? Update: I got errors, I am using VC++ 2008 #include "stdafx.h" #include <stdio.h> int main(int argc, _TCHAR argv[]) { FILE * f = fopen("C:\\Program Files (x86)\\flower.jpeg"); if (f == NULL) { file_exists = FALSE: } else { ...

How to filter txt file by string with using batch

Hello guys I know this kind of problem will be very easy for you but I am total beginner in batch mode. The question is how bat file code should look like to generate a new txt file from specific one . for example . I have report txt Displaying status for license file: 7788@Server01 License Server: server01 Lice...

How do I increment a DOS variable in a FOR /F loop?

I'm trying to read text lines from a file, and increment a counter so I can eventually simulate an array in DOS. I'd like to be able to store the lines of text in a DOS array for further processing. My current attempt is: set TEXT_T="myfile.txt" set /a c=1 FOR /F "tokens=1 usebackq" %%i in (%TEXT_T%) do ( set /a c=c+1 echo %%i, %c%...

Running a batch file with parameters in python OR F#

I searched the site but didn't see anything quite matching what I was looking for. I created a stand alone application that uses a web service I created. To run the client I use: c:/scriptsdirecotry> "run-client.bat" param1 param2 param3 param4 how would I go about coding this in python or F#. seems like it should be pretty simple but ...

In .NET, how do you send multiple arguments into a DOS command prompt?

I am trying to execute DOS commands in ASP.NET 2.0. What I have now calls a BAT file which, in turn, calls a CMD file. It works (with the end result being a file gets ftp'ed). However, I'd like to dump the BAT and CMD files and run everything in .NET. What is the format of sending multiple arguments into the command window? Here is what ...

How do I dynamically specify a file in DOS?

I am trying to use c# in .net to run dos commands to ftp a a file. Technically, it calls a BAT file which calls a CMD file which executes the DOS code. It was up to the CMD file. The CMD fiel will work if I hardcode the path, but I need to dynamically specify the path of the file. BAT File... ftp.exe -s:%~dp0\mycmdfile.cmd And in th...

dos batch programming: howto get and display yesterday date

i am using the date command for a dos script. i am wondering how to use dos command "date" to get yesterday date. ...