ms-dos

the system ccannot find the file "DOS error while using SED"

HI I am using SED to find total number of lines of txt file. want to assign the output of sed to variable BAT file. I used the below code to do this for /f %%a in (`"sed15 -n $= TEST.TXT"') do set linenum=%%a and I get the error message "the system cannot find the file `"sed15 -n $= TEST.TXT"'. how can we solve this? ...

Phar Lap Assembler: I Need information/documentation and binaries if possible.

I've inherited a rather old big and complex codebase for a program originally targeted at MSDOS. It turns out that some sections of this program are written in an obscure dialect of x86 assembler called "Phar Lap assembler", after the company and product that produced the assembler program. I've done a fairly deep google search and I'm u...

Add a new line to a txt file in MS-DOS

Hello, and thank you for reading. I'm making a .bat file and i'd like it to write ASCII-Art into a txt file. I was able to find the command to append a new line to the file when echoing text, but when I read that text file, all I see is a layout-sign and not a space. I think it would work opening that file with Word or even WordPad, b...

(MS-DOS) Time Delays

I came past a few ways to cause a time delay such as pings and dirs. Though none of them are really precise, is there anny proper way to cause a time delay? I heard about a few things though they don't work on all computers, not on my Windows XP nor the Windows NT at college. It takes ages going through all files on Google finding a go...

Letting a Batch file Minimize a DOS window?

So i'm kinda into MS-DOS and such again, but i came to ask myself, How can i minimize a DOS window? Any kind would be ok, minimalize, shrink to a tiny blue block. I just can't seem to find a way to let it work on my Windows XP computer, is realy evrything excluded in XP?! ...

DOS command to Display result on console and redirect the output to a file

How do I display and redirect output to a file. Suppose if I use dos command, dir > test.txt ,this command will redirect output to file test.txt without displaying the results. how to write a command to display the output and redirect output to a file using DOS i.e., windows command prompt, not in UNIX/LINUX. ...

PSEXEC - in ms dos

Hi Friends, While i'm using PSEXEC.exe getting 'Access denied' error for remote systems. Any idea about how to solve this? Thanks, Parani K ...

DOS: Directory listing that excludes a file type?

Hi, all. In MS-DOS, if I enter dir *.pdf, I'll get all the PDF files in a directory. Is there a way to get everything but PDF files? Something like dir !*.pdf? Thanks! ...

~ character in dos...

In my dos prompt i have to put in a ~ character to open any files. but for some reason it wont show up in the dos box/prompt... I'm just wondering if there is any form of ctrl+? thing that could get me to typing a ~ character. It's only the dos prompt that wont recognize that key is what gets me the most though... ...

Better than MSDOS batch files?

Is there something better than using MSDOS in a bat file to run commmand line operations and copy files around. I am running into the old chestnut "gotchas" with long file names etc - and for some reason the bat file wont pause - when I insert PAUSE in my script after running a command - it's just annoying. Whats better out there? Che...

Can I get the short DOS name of a file from PHP?

I want to pass a file path as a parameter to an executable from PHP, and the file path may contain spaces. The executable doesn't seem to handle quotes around the parameter, so I thought maybe I could pass the short DOS name instead of the long name. Does PHP know anything about the old-style DOS 8.3 file names? ...

How can I split a string if it is a MS-DOS type path OR Unix type path?

I have a string that represents a path to a directory. I want split the string if it is a unix type path or a ms-dos type path. How can this be done? For example: <?php $a = some_path1/some_path2/some_path3; // unix type path $b = some_path1\some_path2\some_path3; // MS-DOS type path $foo = preg_split("something", $a); // what rege...

What is the easiest way to reset ERRORLEVEL to zero?

I have a post-build event that runs some commands for a c# project. The last command would sometimes cause the ERRORLEVEL value not equils to zero and then the build fails. I want to append an extra line of command to always set the ERRORLEVEL value to zero. What is the most convenient way to do that? ...

How can I move the contents of one directory tree into another?

I have a directory which contains files and a number of levels of subdirectories: C:\Source I would like to move the contents of C:\Source into: C:\Destination Requirements: All files and all subdirectories within C:\SourceData must be moved I will be running the command in a batch file I can't use Powershell or any other scripti...

MinGW compile for MS DOS

Hi all! I'm using Code::Blocks with MinGW to write my C++ applications in Windows XP. Now I want to compile my code to run under an MS DOS environment, so I can put it on my DOS formatted floppy disc. Can anyone help me? Thanks in advance. P.S. I don't mean the Command Prompt, but really the good old MS DOS Operating System. ...

DOS command to replace all instances of <filename>.config ...

i have an edited version of a config file specific for my machine. i have the same config file in multiple different directories in my development folder. i want to, in a single bat file, replace all instances of this file with my edited one. So in pusedo code: Take C:\edited.config and copy to C:\Projects\ /s wherever original.config i...

how to use dos commands to do following

At the following location \ncsusnasent02.na.jnj.com\its_diq_na_win_dev\PowerCenter\infa_shared\WCPIT_BIO_EDW\SrcFiles\DDDMD\DDD.CLI026.WK0933.DDDMR45.001.head I have one file DDD.CLI026.WK0933.DDDMR45.001.head if i open this file i get data as following(in a single line) HEADER0101IMS HEALTHDMD Weekly D DD.CLI026.WK0933.DDDMR...

DOS: Command-Line Argument Validation

Bear with me, it's been a while. :) What is a good way to validate command-line arguments passed to an MS-DOS batch script? For example, here is what I want to do: IF "%1"=="" throw "Missing 1st argument: Machine Name" IF "%2"=="" throw "Missing 2nd argument: File Path" ...

Is it possible to access the Windows Mobile device directory structure from a DOS prompt?

I want to access the directory structure on a Windows Mobile device from a DOS prompt so I can automated the deletion of certain directories and files on the mobile device. Is such a thing possible? Thanks in advance. ...

DOS scripting - for MSFTP server

I am starting an FTP session using: "C:\Program Files\FTP Server\msftpsrvr.exe" -start Now I want it to wait until it has find a file with a specified string. Details: I am using Mini core ftp on my server and Winscp on my client. The client's time schedule keeps changing. I follow the following steps for automation: On server msft...