Click here to Skip to main content
15,885,767 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 Score

DOS 

15 Nov 2022 by Chris Boss
More about BASIC and what can be accomplished with the language
10 Apr 2023 by Tough Developer
How to open 16-bit Win apps natively on 64-bit Windows using OTVDM/winevdm
13 May 2023 by ToughDev
Exploring PCx86 - IBM PC emulator written in JavaScript
7 Oct 2011 by thatraja
Printing files list(in a directory) using DOS
31 Aug 2012 by Richard MacCutchan
Yes, just type dir /? in a command window for the options available to you. BTW what does this have to do with C++?
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...
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
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...
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...
5 Apr 2023 by ToughDev
Tandy Deskmate on DOSBox v0.7.4
10 Nov 2011 by PIEBALDconsult
Using DOS' FOR command to delete subtrees
4 Feb 2012 by thatraja
Use vbHide instead of vbNormalFocusSo try the below oneCall Shell(Environ$("COMSPEC") & " /c C:\Temp\autoftp.bat", vbHide)FYIVisual Basic for Applications Reference - Shell function[^]
9 Aug 2012 by Sergey Alexandrovich Kryukov
This is totally beyond the batch capabilities. The batch is mostly oriented to the console input/output, but it can also start any application. You could write an application do to it, but, for example, Windows 7 has Win+D key to do it.[EDIT]It simply does not seem to make much sense....
15 Sep 2012 by Richard MacCutchan
Some suggestions[^].
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...
20 Oct 2012 by Member 9531583
I wrote following command in windows XP's DOS shell and something strange happened:C:\Foleder1\copy sample.txt :because of my typing mistake, I wrote ":" instead of "D:", but it copied the sample.txt to somewhere I cant find!I searched my whole HDD for sample.txt but the only instance of...
20 Oct 2012 by Alan N
Yes it's quite clever! You've hit upon a syntax for creating an NTFS alternate data stream and I think you will have created an alternate stream named :sample.txt which is a complete copy of the original file but hidden from normal view.A bit of background is available in...
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...
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%
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:...
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)...
5 Oct 2013 by codestar007
You can check the below link for xcopyxcopy-command.htm[^]
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...
14 Nov 2013 by Roja23
http://files.support.epson.com/htmldocs/pho22_/pho22_rf/speed_1.htm[^]
8 Jan 2014 by hari111r
How to delete all the files in a folder and its subfolder using batch without prompt and also i want to delete the files even its is read only.Please help me to find solution.Thanks
29 Apr 2014 by Sanket Saxena
Why don't you try WinMerge or Windiff. They are good tools to compare and check the files.
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...
27 Aug 2014 by Mehdi Gholam
Your question is like asking "how can you change a mini car into a formula 1 racer?"The answer is there is very little you can do since they are totally different things, and you are better off rewriting everything.
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...
13 Sep 2017 by Graeme_Grant
Watch this: How to create multiple folders at once using a batch file - YouTube[^] Found using this Google Search: batch file to create folders and subfolders[^]
26 Oct 2017 by Dave Kreskowiak
Yeah, you can't do it that way. You have to map an LPT to the share first and then print to the LPT, which is explained in this[^].
14 Nov 2018 by Richard MacCutchan
I just typed "help prompt" at the console and it shows that $_ is interpreted as CRLF.
5 Oct 2019 by OriginalGriff
We can't really tell, but there are a couple of things you can look at. 1) VB code is executed on the Server, not the client - I assume that the printer is installed on the Server because you can't access client computers from VB. 2) On the server, the site runs as part of IIS, which does not...
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...
16 Dec 2021 by OriginalGriff
This is not a tech support site for Microsoft OSes, or it's command line interface: this has nothing to do with development! Start here: The Ultimate Guide to Robocopy[^] and good luck!
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...
24 Sep 2022 by OriginalGriff
While we are more than willing to help those that are stuck, that doesn't mean that we are here to do it all for you! We can't do all the work, you are either getting paid for this, or it's part of your grades and it wouldn't be at all fair for...
12 Nov 2022 by Eddie Winch
I have the following C# Code :- using System; using System.Collections.Generic; using System.Text; using System.IO; namespace Unpac { class Program { //_____________________________________________________________________ static...
4 Nov 2022 by OriginalGriff
There are a couple of things here ... Firstly, as Dave has explained this site is not a "code to order" site - we are here to help those that are stuck, not provide complete solutions. And as he says, with Freelancer et al you get what you pay...
4 Apr 2023 by Tough Developer
How to get Linux to boot on DOSBox-X
5 Apr 2023 by ToughDev
How to play the classic MS-DOS game - Alley Cat - from your browser
8 Oct 2019 by Richard Deeming
Rather than shelling out to a DOS command, you can use code to send the ZPL directly to the printer. Here's the class I use to do that: Raw printer helper · GitHub[^] It's in C#, but you can either convert it, or compile it into a library and call it from your VB.NET code. ...
29 Oct 2011 by cardano7
Hi,I am a windows user who doesn't know anything about linux.One of my friend's notebook laptop has been broken. it does not have CD-Rom and also I couldn't create bootable USB although I tried a lot. I have succeed to boot my friend's laptop by LAN through Tftpd32 server and...
29 Oct 2011 by Mehdi Gholam
If you want to recover a windows system try : BartPE[^]It supports networking and USB drives if they are plugged in before boot.
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[^]
13 Nov 2011 by PIEBALDconsult
Using a few members of the System.Console class to fill the screen
27 Jan 2012 by Nunnenkamp
I'm using wkhtmltopdf to convert a web page to pdf. Right now I am using a scheduled task to execute the console application, but I would like to be able to run it on demand. Is there a way in .Net to run a console app through the web app. I don't need to interact with it, just initialize it.
27 Jan 2012 by Jyothikarthik_N
Try System.Diagnostics.Process.Start()Read more here http://msdn.microsoft.com/en-us/library/e8zac0ca.aspx[^]*Mark as answer if this solves your problem
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.
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. :)
6 Apr 2012 by Corporal Agarn
Yes, look up the BCP utility in help.
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...
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
28 May 2012 by Mehdi Gholam
Read the following :http://www.trickyways.com/2009/10/add-or-delete-users-account-with-command-line-in-windows/[^]http://www.windowsnetworking.com/kbase/windowstips/windowsnt/admintips/network/createwindowsntdomainuseraccountsfromcommand-line.html[^]
28 May 2012 by Sudheer Nimmagadda
Hi All In my batch file from server md folderNameCommand is running well through remote but net user username password /add it is not working through remote, why md is working fine and net user is not working what is wrong pleas help me Thanks & Regards Sudheer.N
8 Jun 2012 by Jonathan [Darka]
Don't take this the wrong way, but maybe you should concentrate on doing your job?You could code something to do this, but anything you do will have to go over the network and could be traced, additionally at some point one of your bosses will notice one of you chatting away and will...
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
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...
6 Aug 2012 by Luiey Ichigo
Hi all,I'm trying to use batch file as command to move file from current folder to another folder. From what I search in Internet, I've found a way to move all file in folder or all same extension in a folder. But I'm not found the way to move anything in folder but with exception...
31 Aug 2012 by Himansu sekhar bal
Can Any one Help me?Is there a command line utility to list file by Date and time on subdirectories.Thank you in advance.
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.
11 Sep 2012 by kpkaran88
Hi i have one folderinside that folder i have lot of version likeV1.0.0V1.0.1V1.0.2i want to move the largest version into another directoryHow to write the batch file for moving the largest version to another directoryHow to done this..?
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 Kuthuparakkal
try compact command:http://technet.microsoft.com/en-us/library/bb490884.aspx[^]
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...
26 Oct 2012 by Jineesh TR
hi,How can i print a text file using command prompt through usb dot matrix printerany one please help me...Regards,jineesh
27 Oct 2012 by Sandeep Mewara
Does this help: How do you get dos mode printout from a Dot matrix printer using usb to parallel converter in windows mode?[^] ?
12 Nov 2012 by G4mm4R4y
Hello! I know there is a simple way to do this. I do not know how. So can someone help me with this question:When i have a /p variable and the user enters the wrong variable how can i stop it from closingLets say i have:set /p a=Choose a option: And the two options are start and...
12 Nov 2012 by G4mm4R4y
Hello! In my rpg i have a save method that saves variables into text files and pull the variable out later on. Is it possible instead of using user editable text files to use uneditable .dll files. I dont want to try because it takes much work to change all my save information and i want to be...
12 Nov 2012 by Sergey Alexandrovich Kryukov
The code could be something like this:@echo offset /p var=Choose a option ('s' to start, 'q' to quit):if %var%==q goto:eofecho working!In this sample, if you enter 'q', "working!" will not be printed, because you go to the end of the script. You also can use functions with batch...
18 Nov 2012 by mohammad ehsan
I want to boot in DOS when i restart the computer , of course i don't want to enter inside windows7 so how can i do that?I also use Window7.
26 Nov 2012 by Sudheer Nimmagadda
Hi all, how can i upload photos in to twitter using c#.net, ASP.net Please Give me good and fast example Thanks & Regards Sudheer.N
26 Nov 2012 by ZurdoDev
Please start at https://dev.twitter.com/[^] and if you get stuck please feel free to ask something very specific.
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 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
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...
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...
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)...
1 Jul 2013 by Valery Possoz
Hello,The program you are trying to use is to old to work on any current Windows version. I'm not sure if Pif is supported anymore, but anyway Pif is just a shortcut to another program. Double click on the pif file won't open it, but you can open this program directly in any dos...
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...
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...
3 Aug 2013 by Sergey Alexandrovich Kryukov
Windows 2003 does not have such thing as "DOS cmd".You should talk just about command-line utility for doing so, that way you could use it in batch files, for example, and do other things. It has nothing to do with "DOS" or "DOS Prompt" which are not supported by Windows (thanks goodness!)...