Click here to Skip to main content
15,891,633 members
Everything / Operating Systems / DOS

DOS

DOS

Great Reads

by Chris Boss
More about BASIC and what can be accomplished with the language
by Tough Developer
How to open 16-bit Win apps natively on 64-bit Windows using OTVDM/winevdm
by ToughDev
Exploring PCx86 - IBM PC emulator written in JavaScript
by thatraja
Printing files list(in a directory) using DOS

Latest Articles

by ToughDev
Exploring PCx86 - IBM PC emulator written in JavaScript
by ToughDev
How to develop PC-speaker MIDI player for IBM PC XT
by ToughDev
How to use NFS to transfer files between Windows and MS-DOS 6.22
by ToughDev
In order to facilitate transferring files from my main PC to my VirtualBox machine running MS-DOS 6.22, I installed Microsoft

All Articles

Sort by Title

DOS 

14 Nov 2018 by ilostmyid2
remember ansi.sys? colorful prompts are not supported anymore! unless with some tools like ansicon. anyway, i need to know how can i go to the beginning of the next line. what is its ansi escape sequence? i need my prompt to be like: path > so that what i type appear from the beginning of the...
14 Nov 2018 by Richard MacCutchan
I just typed "help prompt" at the console and it shows that $_ is interpreted as CRLF.
15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
5 Mar 2013 by Ger Hayden
In a thowback to the '80's I am using a batch script to log SOAP injectionsThe output file name is time stamped but it only works properly after 10:00!echo onecho %DATE%echo %TIME%set datetimef=%date:~-4%_%date:~3,2%_%date:~0,2%__%time:~0,2%_%time:~3,2%_%time:~6,2%echo...
6 Mar 2013 by Richard MacCutchan
You could extract the first character of the time value and if it's a space rebuild it with a leading zero. Something like (my .bat skills being rusty):set Z=%time:~0,1%if %Z% NEQ 0 set Z=0set newtime=%Z%%time:~1,7%Reviewing this I realise you need to check for the digits 1 and 2 also.
5 Dec 2012 by esonparedes
I have .xml file in my folder. I want to specifically transfer them to another folder.For Example:FOLDER A:2012P02B.XML2012P02B.XML2012PCXB.XML2012P80K.XML2012PC6H.XML2012P93L.XML2012P02X.XMLI want to transfer all of the others except to "2012P02B.XML" to FOLDER...
5 Dec 2012 by OriginalGriff
Use the wildcards: "*" is "any text", "?" is "any character"Try:copy 2012P02?.XML C:\FOLDERB
5 Dec 2012 by Elerian
If you want to move all files except one single file, you can rename it before moving the other files and restore it when your done.set KEEPFILE=2012P02B.XMLset TARGETDIR=C:\FOLDERBren %KEEPFILE% %KEEPFILE%.keptmove *.XML %TARGETDIR%ren %KEEPFILE%.kept %KEEPFILE%
5 Dec 2012 by esonparedes
How to get the letters/word in a filename?For Example: 2012P02B.xml - i just want to get the letters: "P02B"Please help me. Thanks and Regards!
5 Dec 2012 by Pablo Aliskevicius
What do you mean by "get"? ECHO? Write to a file? Load into a variable?To get echo, try this:DIR 2012*.XML /B > TEST.TXTfor /F "eol=. tokens=2 delims=2." %i in (test.txt) do @echo %iThe first line creates a text file with bare names of all matching files.The second line runs on the...
10 Apr 2021 by Luiey Ichigo
Hi all,Does anyone know the command line to compress a folder to zip? Like on our default Windows OS, even we don't install 3rd party software to compress, we also can compress the folder by right click the folder/file and Send To --> Compressed (Zipped)Is it possible to compress the...
20 Feb 2013 by Sergey Alexandrovich Kryukov
If you really want to do it without using any 3-rd party compress utility, with just the batch, you can use Windows Script Host (WSH):http://en.wikipedia.org/wiki/Windows_Script_Host[^].You can find a good number of code samples, this is just one of them:...
10 Apr 2021 by Member 15145375
unzip in batch @echo off if "%1"=="" goto end setlocal set TEMPDIR=%TEMP%\ZIP set FILETOZIP=%1 set OUTPUTZIP=%2.zip if "%2"=="" set OUTPUTZIP=%1.zip :: preparing VBS script echo Set objArgs = WScript.Arguments > _zipIt.vbs echo InputFolder...
3 May 2012 by vikram_shinde
Hi,I have to write a batch script for comparing two files.The filenames should be like -- HP_OTT_todaydate.txt and HP_OTT_yesterdaydate.txtHT_OTT is fixed part in both filenames. I want to get today's date and yesterday's date and suffix these date to the fixed part of filename....
4 May 2012 by vikram_shinde
I am able to solve problem using powershell,$yesterday = Get-Date -UFormat %d%m%Y -Date (Get-Date).adddays(-1)$today=Get-Date -UFormat %d%m%Y$strReference = Get-Content C:\batchtest\HP_OTT$today.txt$strDifference = Get-Content C:\batchtest\HP_OTT$yesterday.txt Compare-Object...
4 Sep 2012 by Himansu sekhar bal
Can Any one Help me?Is there a batch scripts for windows utility or vc++ code to list file by Date and time .for example ...
4 Sep 2012 by ♥…ЯҠ…♥
I hope the below link would provide you the answerhttp://wiki.answers.com/Q/In_ms_dos_which_command_can_sort_files_in_a_directory_list[^]With regards,R.K.
31 Jul 2013 by G4mm4R4y
Im saying this at the beginning so it doesn't happen: Don't say anything bad about batch its needed for a reason.I need wildcards in an if statement something likeif "food is good"=="food * good" echo Yes I agree it is                                              (Wildcard)Is...
31 Jul 2013 by OriginalGriff
AFAIK the batch IF Statement only works on string equality / non-equality, there are no wildcards.However, it would not be difficult to write a quick'n'dirty application which takes two strings as parameters, and returns ERRORLEVEL 0 for equality and +1 and -1 for greater and less than. Since...
9 Apr 2019 by Elias Bachaalany
Practical and useful Batch files scripts for beginners and advanced users
29 Jul 2012 by Sandeep Mewara
It does not work like this here.Here is what is expected of enquirers:1. TRY first what you want to do! You may find that it's not that hard.2. Formulate what was done by you that looks like an issue/not working. Try them and tell if you face issues.Members will be more than happy...
8 Apr 2013 by klottim
I'm Trying to hide cleanmanager when started via CMD but I can't hide it... It is still showing up and won't go away until it's finished.How can I fix this? Been looking up for answers for hours but can't find a solution.public partial class MainWindow : Window{ ...
8 Apr 2013 by Alan N
startInfo.WindowStyle = System.Diagnostics.ProcessWindowStyle.Hidden;startInfo.FileName = "cmd.exe";startInfo.Arguments = "/C attrib advancedcleanmgr.reg +s +h & cleanmgr sagerun:6553";The effect of this section of code is to start a hidden instance of cmd.exe and execute 1)...
5 Apr 2012 by Member 8789858
I would like to if/how I can read a dos text file from my pc into a sql server script.
6 Apr 2012 by Corporal Agarn
Yes, look up the BCP utility in help.
31 Dec 2018 by Member 14095469
I have .DLL file and I want to Link this DLL with My Project with is running on MS-DOS System. So How Can we do it, if we can use .dll on ms-dos system. What I have tried: I have Create One dll on visual studio 2015 and I am trying to add this dll on my project =, but still I am not sure We...
30 Dec 2018 by Rick York
I do not believe that MS-DOS supports dynamic-link library loading.
31 Dec 2018 by Dave Kreskowiak
DOS itself doesn't support loading .DLL's for you. Your executable code has to implement it's own loader to do this. Chances are really good that you created a .DLL file that can only be used by Windows, not DOS. Also, are you confusing a Windows, Console application that runs in a Command...
30 Jan 2014 by Vinit_J
I want to learn ms Dos and i cant find any good books to learn it in my locality..so can sumone plz suggest some gud books?!
30 Jan 2014 by Abhinav S
http://books.google.co.in/books/about/The_Best_Book_of_MS_DOS_5.html?id=w4ghAQAAIAAJ&redir_esc=y[^]
15 Sep 2012 by Luiey Ichigo
Hi all,Right now I want to create a batch file which compress multiple file into a "something.zip" for example. Let say I'm using fresh windows without installing any 3rd party compression software,how would I do that? Because by default, windows itself has compression software just like you...
15 Sep 2012 by Richard MacCutchan
Some suggestions[^].
15 Sep 2012 by Kuthuparakkal
try compact command:http://technet.microsoft.com/en-us/library/bb490884.aspx[^]
12 May 2018 by CPallini
Did you see this: Is there a C compiler that targets the 8086? - Stack Overflow[^]? You may also choose to translate yourself the C program (if it is a simple one).
12 Apr 2023 by User 13703492
Hi all Does anyone if it is possible to convert C source code into 16-bit 8086 assembly (for use with EMU8086)? Thanks What I have tried: Tried using the assembly code emitted by Visual Studio but it is 32-bit and won't work.
5 Oct 2013 by Usha Muhunthan
I am copying file from server to local using DOS command "xcopy "C:\Important Files" D:\Backup /c /d /e /h /i /k /q /r /s /x /y"Can i use destination name as server instead of local name D:\BackupThanks in advance
5 Oct 2013 by codestar007
You can check the below link for xcopyxcopy-command.htm[^]
20 Apr 2018 by pieterjann
I am looking for a way to copy the file "test.txt" to my usb printer which connected via USB002 port. this file contains some code instructions which design my print page. The reference of the printer tells me to copy the txt file to the printer using the DOS command line. But I really do not...
25 Sep 2012 by Mazumder.Soumen
This command should work for it.COPY /B test.txt USB002
26 Sep 2012 by Mazumder.Soumen
I thought that USB002 is your printer port. Sorry for the confusion. First you need to map your printer to any of avilable printer port. To do that follow the step as given below1. Open the Printer Property Page.2. Go to the share / sharing tab. Check the Share button and give the one...
28 Jan 2015 by Richard MacCutchan
Please do not open a new question in cases such as this, reply to the original at: copy file to USB002 printer using commandline in windows[^].
25 Feb 2022 by TegDev
I was tasked to create a TUI based system which will be soon connecting to our current system via API (written in Laravel and MySQL). I tried using npyscreen but unfortunately my boss doesn’t want the UI. He prefers this kind of UI...
24 Feb 2022 by Maciej Los
I'd suggest to read this: terminaltables · PyPI[^] There you'll find 3 examples. Similar question has been asked on SO, see: split - How to display two different outputs in python console - Stack Overflow[^] A win32console module looks very...
22 Jun 2012 by Sudheer Nimmagadda
Hi all, i need to create new FTP users by using commands in Command prompt My OS is windows Server 2008 please make me to Run Command successfully..Thanks & Regards Sudheer.N
10 Nov 2011 by PIEBALDconsult
Using DOS' FOR command to delete subtrees
12 May 2023 by ToughDev
How to develop PC-speaker MIDI player for IBM PC XT
16 Apr 2015 by Jamie888
Hi, may I ask the difference between echo time and net time? Is the time returned using "echo time" a local PC time and whereas "net time" is server time?I have tried search from the Internet but I can't seem to find the answer I want.Any input is appreciated.Thank you.
16 Apr 2015 by phil.o
echo time does not return the actual date & time, it returns timeecho %time% returns the actual time of the local PC.net time returns the local time of the synchronization server configured for the PC, if any; it returns an error if no synchronization server is configured.
12 Nov 2014 by VipinKumar Maurya
Does batch command depends on version of os? ie does it differ for 64bit and 32 bite versions. or does its way of presentation differs. Actually i am installing IIS on win7,8 and 2008 server and all with both 64 bit and 32 bit.When I tested the batch commands on 64 bit it worked but same file...
23 Feb 2012 by Gary_L
I am just looking around for a DOS backup batch file that will copy all files including system files from one drive to another.Thanks,Gary
23 Feb 2012 by Richard MacCutchan
Type xcopy -? at your DOS prompt and go on from there.
2 Jul 2014 by Member 10920337
Hello Everyone,I have a couple of questions for you. I hope you guys can help me with these 2 questions.1. How to create a batch file that will fill the entire screen with your name and with different colors.2. How to create a batch file that will create a directory named chanel in...
2 Jul 2014 by Sergey Alexandrovich Kryukov
Please see my comment to the question. I would not advise to play with colors and window size for batch files.Here is what you can do:Run this batch file created by Rob van der Woude: http://www.robvanderwoude.com/allhelp.php[^].It will generate the file "allhelp.htm" which...
6 Mar 2016 by FrostedSyntax
How to create batch files that make navigating the filesystem in the command prompt a breeze.
9 Jan 2023 by Member 12014914
Hi, I would like to display the odd and even integers from 1 upto given number and display the sum of odd and sum of even but there's always an error saying too few parameters. (void function is required) And lastly where should i put the formula for getting the sum of odd and sum of even?#...
30 Sep 2015 by Patrice T
Your problem is that n is not a parameter but a local variablevoid even_odd(int n){must be replaced byvoid even_odd() int n;{Ooops, you also need to change the line before main tovoid even_odd();If you compile as is, Turbo C will tell you that there is another problem...
30 Sep 2015 by Leo Chapiro
Quote:an error saying too few parameters. (void function is required) Your function void even_odd(int n) expects a parameter, but you call it without any:even_odd();Try it like this:# include # include void even_odd(); int main() { ...
30 Sep 2015 by Wendelius
Others have already described the problem with the call. So what comes to calculating the sum; You already have two loops, one for odd and another for even numbers, why not calculate the sum inside those loops.Something like:...for(i = 1 ; i
5 Jul 2013 by hansoctantan
Hello Everyone,Why this is not working in DOS Command -> Extracting a self extracting exe with passwod"D:\TIMELINE\28062013\Exe.exe" passwordBut this works finecd D:cd Timeline\28062013Exe.exe passwordPlease help, I will use this code in vb.net to automatically extract all...
5 Jul 2013 by OriginalGriff
Possibly, because of permissions on the folder you are starting off in.When you change disk and directory directly, you set the current folder for the application to execute in - so any extracted files will go into that folder. If you don't, then you could well (read almost certainly are)...
25 Sep 2012 by sunder.tinwar
Hi Guys,I am writing a module which will be executing any kind of shell commands related to active directory and other shell commands on a particular domain controllerSome of command are working but some of commands are not working properly. Here is the codepublic static void...
25 Jun 2018 by Aditya_ETL
I have a batch script which first copies file from one location to other folder and then creates a list of name of the files in a text file: Below Code: COPY \\CDFS23001\\SOURCE\ORG\*ACCOUNTS*.xml \\CDFS23001\\SOURCE\TGT\ dir /b \\CDFS23001\\SOURCE\TGT\*ACCOUNTS*.xml >...
25 Jun 2018 by Dave Kreskowiak
It's not a timing problem. It's a spelling problem. Look at your "ACCOUNTS" on one line and "ACCOUNT" on the next.
13 May 2023 by ToughDev
Exploring PCx86 - IBM PC emulator written in JavaScript
5 Apr 2023 by ToughDev
Tandy Deskmate on DOSBox v0.7.4
16 Apr 2015 by Jamie888
Hi, I am using command prompt and I entered the following command:--> NET TIMEIt returned me the following message:Current time at......is 2:09:45 PMThe command completed successfully.As from the message above, the time do not have milliseconds. How can I include also the...
4 Apr 2023 by Tough Developer
How to get Linux to boot on DOSBox-X
10 May 2021 by Member 13684076
I've been struggling with the following prompt for hours: In MS DOS, Write an assembly language program that will accept a single character from the keyboard, and then output the next character in the ASCII sequence. For example, if the character 'A' is entered, the character 'B' will be typed...
18 Feb 2018 by Richard MacCutchan
In any computer language adding 1 to 'A' will produce 'B'. If you do not understand that basic concept then you need to get hold of an introductory book on computers.
10 Nov 2011 by sanjayv.gade
Can any one help me to get "last result" column of each scheduled job (Tasks) in windows computer in control panel? using C#
10 Nov 2011 by Pandya Anil
follow the link, there is a thread for the same questions...how to check scheduled jobs status which is run under windows Task scheduler in C#?[^]
10 Nov 2011 by Prerak Patel
Here is example in C++. http://msdn.microsoft.com/en-us/library/windows/desktop/aa446835(v=VS.85).aspx[^]
5 Apr 2012 by sanjayv.gade
Hi guys,Thanx for your help.I've got one dll using that dll i got other properties of scheduled job in the Task Scheduler.just need to access task using administrator login. :)
29 Nov 2013 by Braydon
How can I make a bat file stop working after it has been clicked so after 15 min it doesn't work forever?Is this possible?
29 Nov 2013 by ExcelledProducts CEO
@echo off:loopstart yourtarget.exe ...timeout /t 1200 >nulltaskkill /f /im yourtarget.exe >nulgoto loopThis will restart your program every 20 minutes.I think I will elaborate on what it does and how you can edit it.The key part is the "timeout" function witch is standard...
20 Nov 2014 by syedmas
Hi,I have a question. consider i am copying 100 images from one drive with same path to another drive.copy /Y "d:\log\games\images\283.png" "c:\log\games\images\283.png" >> log.txtcopy /Y "d:\log\games\images\289.png" "c:\log\games\images\289.png" >> log.txtcopy /Y...
20 Nov 2014 by Sinisa Hajnal
Better way:copy /Y "d:\log\games\images\*.png" "c:\log\games\images\" >> log.txtIt will copy all png from d: to c: with same names...If you want to create the folder if it doesn't exist you'll have to delve into batch files[^] to run :)Or use xcopy, I vaguely remember there is an...
20 Jun 2014 by vicvis
I have a C# program that calculates a date. I want to set an environment variable datayyyymmdd to be read outside the program to be expaned into a filename that I need to look for with the Dos code.To be more specific:input arguements for abc are x and y.I’d like to basically do like...
20 Jun 2014 by Sergey Alexandrovich Kryukov
First of all, there is no such thing as "DOS command", because, on all systems capable of running .NET, there is not such thing as "DOS". And of course, the variables don't "persist" when a program is closed. Data can persist, so you can assign the same very set of data to the same variables...
20 Jun 2014 by Richard Deeming
The Environment.SetEnvironmentVariable[^] method provides three targets via the EnvironmentVariableTarget parameter:Process - the variable only applies to the current process;User - the variable is stored in the registry for the current user, and persists across reboots;Machine - the...
20 Jun 2014 by PIEBALDconsult
I haven't taken the time to find out how, so in the past I have had the console app write a BAT file that can then be called. :shrug:
12 Sep 2022 by denman0000
I have been searching for a few weeks now for solutions but can't find a clear way to do this. There are a number of challenges because the column vales change in size for example row in a job/printout may have a a LENGTH value of 345 while a...
11 Sep 2022 by merano99
I can't see any data garbage or PCL codes in the text shown. It is not clear exactly what the original file looks like and what the desired result would be. All non-displayable codes would be very easy to omit with e.g. C or C++. Replacing with 0...
9 Nov 2013 by Braydon
So my batch file is like a game that has money, Well I want it to subtract if they buy something from the game,My code is below.Game.bat@echo offset money= 1000echo money left %money%echo this is a sample tradeecho 1.) Buy gem ($10)echo 2.) Buy sword($35)echo 3.) Buy...
9 Nov 2013 by OriginalGriff
To be honest, Sergey is probably right - doing this kind of thing in a batch file is not the easiest way: it's a bit like trying to move house using a Ford Ka. You can do it...but it's going to take some serious effort and you'd be much better off using a Transit instead. :laugh:But, if you...
3 Aug 2020 by Member 12899279
for eg i have a system how to find all the fixed drives first then iterate them one by one recursively i.e search all folders and subfolders for specific extensions like .mp3,.mp4,.wav etc with below command i can search in onl one drive that too...
10 Mar 2020 by CPallini
Have a look at this page: batch search for windows drive letter, if exists set as variable and execute command, else try another letter - Stack Overflow[^].
3 Aug 2020 by l o o l
Use dir with several files/extensions: dir "C:\Folder-A\File-1.txt" "D:\Folder-B\File-2.log" ... Also use for loop to gets all the logical drivers on your system, try: rem :: In command Line : for /F %i in ('wmic logicaldisk get...
11 May 2021 by 404byter
I dont know how to mix all this languages and nobody understand Please unite or delete some of them What I have tried: I try it all Somebody knows what is the name of programming for professionnal applications such as abelton live or adobe...
10 May 2021 by OriginalGriff
ZIP isn't a "programming language" - it's a compression algorithm and / or the application that implements it and allows you to make your files smaller, usually for transfer or long-term storage. DOS isn't a "programming language" either - it's...
11 May 2021 by RickZeeland
You can find the source code (mostly C++) for Ableton Link here: GitHub - Ableton/link: Ableton Link[^]
28 May 2012 by Sudheer Nimmagadda
Hi All, how can i create Users remotely with command prompt i have Server Credentials (User Name and Password ) Thanks you very much advanced Sudheer.N