dos

Find and Replace a batch file using DOS

Hi This is what i need. Lets say there is a file temp.txt Lets say temp.txt has the following content : name=@name age=@age email=@email And my batch file create.bat should ask for the three parameters as input from the user, and then replace the temp.txt with the respective values. Say. Pls enter your name:Tom Tom - Confirm Y/N...

Menu with Drive letter confirmation

Im currently trying to execute a batch script under dos thats being booted before windows Im trying to Load the img file containing the boot sectors to boot into a "bootable floppy" from flash disk and execute a batch file called installer.bat When the batch file is run it should ask a the technician to verify a drive letter, and then ...

About the relocation table in DOS EXE header

From the above we can see count of relocation table entries is 0(there is no reloc item), but offset of first reloc item shows that the reloc item actually exists. The definition of DOS EXE Header is here. How to understand it? ...

Microsoft DOS vs Unix

Which one is more powerful operating system? And is it possible to convert Microsoft-DOS batch file into Unix Script and vice-versa? ...

In cygwin how do I check the file format of a file, how do I change the format from dos to unix?

In cygwin how do I check the file format of a file, how do I change the format from dos to unix? This question has probably already been answered before, but I could not find the answer in previous posts ...

Using assembly routines with C on DOS

Hello, I've been playing with DOS real mode assembly for a while and now I want to utilize some routines in a C program. I'm using Turbo C 2.01 and TASM 3.0. I'm however unable to modify a variable passed by address, see the _setval routine below. I don't need/want inline assembly. A simple example: foo.c #include <stdio.h> extern voi...

Has anyone gotten MASM Assembly Language working in Wine for Linux?

Apparently WIne doesn't support 16bit DOS apps. Anyone know how to Get MASM intel-style assembly working in wine? ...

DEL saying path doesn't exist (it does)

I'm guessing this is a basic DOS question, its with the del command. All I want to do is delete a file. C:\Documents and Settings\matthewe\Desktop\testfolder>del C:\Documents and Settings\matthewe\Desktop\testfolder\test.pdf The system cannot find the path specified. I can guarantee that test.pdf exists, and the fact I'v...

Listing folders and sub-folders in DOS and Unix?

Hi! I have to list folders and sub-folders from a given directory in DOS and Unix. I know i cand make this with DIR command, as follows: dir directory /ad /s, but the assignment tells me that I have to make it with find. It works with dir, but i have no idea how to make it with find. And I have to make it in UNIX too, so if you have som...

Batch File: List all files not beginning with "SP"

Hello I have a DOS batch file that performs an action for files beginning with text "SP", as follows: FOR /F "tokens=*" %%A IN ( 'DIR SP*.sql /s /b' ) DO ECHO .compile_file = "%%A" >> output.txt The key bit here is obviously: DIR SP*.sql /s /b I need to do a similar thing before the "FOR" line above, but for all other files not st...

translate data file with odd Hebrew encoding

I have a binary data file, in a format used by a relatively ancient program, which I am trying to convert into something sane. With the help of a Hex editor I have basically worked out the file format except that it contains Hebrew characters with an odd encoding. All characters are 8 bits. The "standard" 27 consonants (including "fin...

Remove differences between two folders

Hi, can anyone please suggest a method (ruby, python or dos preferable) to remove only the different files and sub-folders between two given folders? I need it to recurse through sub-directories and delete everything that is different. I don't wanna have to install anything, so a script would be great. Thanks in advance ...

create a log from a batch file

I have a batch file (.BAT) and would like to capture its output into a file automatically every time it is run. I know I can use redirection but then I wouldn't be able to watch it as it's running. Also, other people use this batch file and I want the log to be created without the user having to do anything special. ...

DOS Command FindStr

Hi, I have a need to use the DOS command FINDSTR to search in all our source code files mixed with other types of files such as PDF, exe, dll, etc. I do not need to search those binary files. Is there a way to exclude binary files? My command looks like findstr /r /n /o /s /g:c:\projects\vsssearch\muafinddata.txt /d:c:/projects/axl *...

Executing DOS commands from Java

I'm trying to read a file from the user, in which each line is a DOS command, and run it (it's okay to assume the commands are legal), but when I give a command like echo hi, I get runtime exception error: Exception in thread "main" java.io.IOException: Cannot run program "echo": CreateProcess error=2, The system cannot find the file...

gzip equivalent in dos

Hi, I need to use DOS to zip files. I have file with similar but not exactly same filenames. for example one file is call temp.txt and the other is called temp123.txt I need to create a separate zip version for each of the files i.e. I need a temp.zip and temp123.zip. using the zip command with temp.txt creates only 1 zipped folder whi...

Why does only the first line of this Windows batch file execute but all three lines execute in a DOS command shell?

I have a batch file that executes three Maven commands, one after the other. Each command can be successfully executed in the script - by itself!. But when I add all three commands to the same file, only the first one executes before the script exits. Any idea why? mvn install:install-file -DgroupId=gdata -DartifactId=base -Dversion=1.0...

how to get DOS path instead of Windows path

In a DOS window, how can I get the full DOS name / short name of the directory I am in? For example, if I am in the directory "C:\Program Files\Java\jdk1.6.0_22", I want to display it's short name "C:\PROGRA~1\Java\JDK16~1.0_2". I know running dir/x will give me the short names of files / directories in the current directory but I have...