ms-dos

Windows 'dir' command, Order By Name AND <something>

Greetings, From the screenie below we can see a directory ordered by Name in Windows Explorer: *Edit: Didnt work -> * Link If I try the same thing in MS-DOS it orders by name differently - correctly: dir *.jpg /ON /B cubierta.jpg pag00.jpg pag06.jpg pag08.jpg pag09.jpg pag100.jpg pag101.jpg pag102.jpg pag103.jpg pag104.jpg pag105....

TBC files from an old and unknown database system

Hi, I have a bunch of *.TBC files from a very old application that runs in MS-DOS called TURBOLAB. Anyone know which DB System use files with a TBC extension. I've tried renaming the files to *.dbf to check if they are dBase files with no luck. Any idea? ...

In Windows, how do I run a shortcut into the background from a command prompt?

cmd /C "myshortcut1.lnk" cmd /C "myshortcut2.lnk" Works, but gives me a pop-up DOS window which, when closed, kills my two loaded programs. Same is true for this: start /B cmd /C "1.lnk" start /B cmd /C "2.lnk" start /B cmd /C "3.lnk" start /B cmd /C "4.lnk" ...

Running applications through Telnet

Hi, I need to create a BAT file to run an application through telnet, but as far as I know there is no way to do this on DOS. Telnet does not allow any command to be sent to the remote machine at the very instant of the connection, and each subsequent command in the BAT file would only be executed after telnet stops. This hypothetical p...

How does Windows determine/handle the DOS short name of any given file?

I have a folder with these files: alongfilename1.txt <--- created first alongfilename3.txt <--- created second When I run DIR /x in command prompt, I see these short names assigned: ALONGF~1.TXT alongfilename1.txt ALONGF~2.TXT alongfilename3.txt Now, if I add another file: alongfilename1.txt alongfilename2.txt <--- created third ...

How can I get a directory listing of DLLs with ProductName and ProductVersion?

When I look at a directory in Windows Explorer, I can see a ProductName and ProductVersion property for the DLL's in that directory. I need to export this DLL list with ProductName and ProductVersion into a text file. If I do c:\>dir *.dll > test.log, the test.log does not have the ProductName and ProductVersion. Could someone help me...

What ever happened to deltree, and what's its replacement?

In earlier versions of MS-DOS - I want to say version 7, but I could be wrong - there was a deltree command, which recursively deleted all subdirectories and files from a given path. deltree no longer exists, but del didn't seem to inherit the ability to delete a tree. del /s deletes files, but not folders. How to you easily (i.e., ...

How can I feed standard input to a batch file when an app run from the batch mucks with stdin?

Here's a minimal batch file, demo.bat, to illustrate my problem: @ECHO off set /p foo=Enter foo: echo. echo you typed "%foo%" sqlcmd -? set /p bar=Enter bar: echo. echo you typed "%bar%" I have an input file foo.txt that looks like so: foo_value bar_value I run my batch file as demo.bat < foo.txt. The output is: Enter foo: y...

MS DOS edit a file

I am writing a batch script which I wish to open a file and then change the second line of it. I want to find the string "cat" and replace it with a value that I have SET i.e. %var% . I only want this to happen on the second line (or for the first 3 times). How would you go about doing this? ...

Embedding a DOS console in a windows form

Is it possible to embed a DOS console in a Windows Form or User Control in C# 2.0? We have a legacy DOS product that my Windows app has to interact with, and it's been requested that an instance of the legacy product should run within the Windows application. At the moment, I'm using the user32.dll to locate the window that the DOS pro...

How to clear last line in DOS?

Hello I have maybe dumb question - is there a function, that clears last line in command prompt? I dont mean "cls" - it clears the whole sreen, I want to delete just the last line. e.g. I am searching for a file in a folder and its subfolders and I want to print to cmd current folder - but I want to rewrite it, when the folder changes,...

Read Text file with dos null byte

I have a text file with dos elements - hex(00) for exampel. I need to read it and convert it. Have tried to use utf8toansi, but this removes the whole line with hex(00). Are there any way to convert to text in the whole file ? I am using win32, RadStudio2007, Delphi. ...

How to use a program which is not in the source code's folder?

For example: I'm on MS DOS, I have a source code in the folder C:\Documents and Settings\Programs. Can i make my source code use a program (for example gnuplot) that is in a random folder? ...

Windows command for file size only?

Is there a Windows command that will output the size in bytes of a specified file like this? >filesize test.jpg 65212 I know that the dir command outputs this information, but it outputs other information also. I could easily write such a program but I would prefer to use a native Windows command if possible, or only what is availabl...

How do I echo and send console output to a file in a bat script?

I have a batch script that executes a task and sends the output to a text file. Is there a way to have the output show on the console window as well? For Example: c:\Windows>dir > windows-dir.txt Is there a way to have the output of dir display in the console window as well as put it into the text file? Thanks ...

Dos DIR command output in various localized versions - HELP

Hey all, I have a strange (don't ask) need to see a few examples of a msdos (winxp cmd shell) DIR command for lots (some) of different localized versions of windows (eg. french, spanish, etc). The specific command I need is (note that this command is important... if you don't bother to use this command then don't bother to respond): d...

How to print a newline in an MS-DOS script?

I want to print the output of a program in MS-DOS so I wrote a .bat file that says: cls ruby foo.rb But the output - as it appears on my command prompt - looks like this: c:\workspace>ruby foo.rb foo output c:\workspace> I wanted to insert a newline into the output using MS-DOS because I don't want to pollute my Ruby code with anyt...

How to get around a 'by design' issue with Windows dir?

dir /b produces a nice file-only list dir /x produces a detailed listing (date, time, size, longname, shortname) if you combine the two (i. e. dir /b /x) the /x switch gets ignored. this behavior as per this page is by design. so if you ask for a simple list containing only of shortnames of files, redmont says it is against the rules ...

Reverse Engineering old paint programs.

I've got a couple of really old MSDos based paint programs. They work on palette indexed image buffers. They have a number of spectacular shape drawing tools, brushes and effects that simply do not exist in any modern paint program- Particularly not whilst staying within the "bounds" of a low color palette indexed image. I would like to ...

How to use an iterating variable in a for loop in MS-DOS batch files ?

I have a batch file which does something like this for %%a in (1 2 3 4 5) do dir > %%a.output %%a just gives me a . How can I use the value of the variable %%a to assign the file name (e.g. 1.output, 2.output) ? ...