DOS is a family of operating systems for IBM PC compatibles of the 1980s and 1990s, including MS-DOS which was then displaced by Windows. For Windows batch files and command line, use the tags [windows], [batch-file] or [cmd]. For DoS as in denial of service, use [denial-of-service].

learn more… | top users | synonyms

0
votes
1answer
11 views

how to assign the output value of a command to a variable DOS

DOS QUESTION...I want the output value of this command wmic logicaldisk where "DeviceID='C:'" get FreeSpace to be assigned to a variable which I can use in a IF condition.
0
votes
3answers
49 views

Windows batch comparing strings with case sensitivity

I am trying to compare a string that needs to be a case-sensitive compare in a DOS batch script. I cannot figure out how to turn ON the case sensitivity in a IF statement. Here is what I am doing ...
0
votes
0answers
10 views

Redirecting standard output and standard error to somewhere on an Excel workbook

I have a process written in VBScript that writes to the standard output and standard error streams. It has a fairly elaborate command line interface and I provide (following persuasion by colleagues) ...
2
votes
2answers
34 views

How do I put files in respective folders as per date (part of filename) in DOS/Batch?

I'm trying to sort some thousand files on a Windows server into multiple folders. File names are Extract_YYYYMMDDHHMISS.dat where YYYY is the year, MM is the month and DD is the date. I want to move ...
1
vote
3answers
58 views

Get-ChildItem equivalent of DIR /X

How do I show a directory listing in 8.3 notation in PowerShell?
0
votes
1answer
27 views

Running a Dos Command from PHP

I am trying to use a command from PHP to print a file using cygwyn. Below is my code. I am able to use this from command line however, when I run this from the PHP, it does not work. exec ...
0
votes
0answers
11 views

truncating leading characters of the value stored in the %%a variable

In DOS, I am trying to take the output from a command and assign it to a variable, then take the output and truncate the first two lines of the string. Here is a snippet of what I am trying to do: ...
0
votes
1answer
24 views

Sort directory in DOS and grab first n files

I need to sort a directory alphabetically and then grab the first n files in the folder. This is all in DOS. I was using this as a start: for %a in (*.tif) do ( bla bla ) NOTE: all files in ...
1
vote
3answers
48 views

Safe way to concatenate DOS variables to avoid unseen tab characters causing a double execution of a DEL command?

I have a batch file: C:\zzzztemp\zzzBUG_TEST.cmd set backup_folder=.\BUG_TEST echo %backup_folder%\*.* del %backup_folder%\*.* pause ...whose output is: C:\zzzztemp>set backup_folder=.\BUG_TEST ...
0
votes
2answers
26 views

DOS Batch file - Copy file based on filename into folder

I would like to use a batch file to put them into default folder, but the account name is in the middle of the folder. Have any script I can use in dos command prompt? 888123AA.pdf 888123BB.pdf ...
0
votes
2answers
17 views

Batch file, loop on folder seems to freeze

I need to delete with a batch a list of directories (and subdir) which name starts with a number. My tree is something like that: |- root |--event=aaa |--photo |--123 ...
0
votes
1answer
7 views

need to run 72 x 24 programs in an AUTOMATIC sequence of events, with each event executing 6 programs in parallel

I have to run different programs (72 in number) for each of testinputs (24 in number). I want if i can run 6 programs at one time in parallel for 1 testinput. Further, its needed that automatically ...
0
votes
2answers
15 views

Find files NOT matching *_abc.*

In dos, when I wanted to get a list of files matching a specific filter, I could use something along the lines of: *.* - Means return everything *.txt - Means return all files with a .txt extension ...
0
votes
1answer
29 views

Get Server name of batch file from within batch file

MachineX is calling a batch file through UNC path to either MachineA or MachineB, depending on server failover status: If everything is good, the batch is called via path \\MachineA\files\Batch1.bat. ...
0
votes
0answers
22 views

nested for loop in DOS

I need to write a simple program with DOS, I've never used it before but I have experience with UNIX and other programming languages. The program takes 208 pictures in a folder and then arranges ...

1 2 3 4 5 91
15 30 50 per page