Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

MS DOS

Posted on 1997-12-24
2
Medium Priority
?
178 Views
Last Modified: 2010-04-16
How can I use for instance the dos command format c: in a pascal prg?
0
Comment
Question by:MeNaCe
2 Comments
 
LVL 1

Expert Comment

by:Odie
ID: 1217022
SwapVectors;
Exec('format', 'c:');
SwapVectors;

I think it was like this.
0
 
LVL 2

Accepted Solution

by:
omsec earned 150 total points
ID: 1217023
Hi ya there !!

Executing Dos - Command is easy !!

Program DosCMD;

{$M 8192,0,0}

Uses
  Crt, Dos;

Var
  Command : String;

Begin
  ClrScr;
  Command := 'dir';
  Command := '/c' + Command;
  SwapVectors;
  Exec(GetEnv('Comspec'), Command);
  SwapVectors;
  Readln;
End.  
 
Greets, Omsec
0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Your business may be under attack from a silent enemy that is hard to detect. It works stealthily in the shadows to access and exploit your critical business information, sensitive confidential data and intellectual property, for commercial gain. T…
Ranking ecommerce websites is a vital process. You need to have a strong SEO (Search Engine Optimization) strategy. If you don’t have one, you are losing out on brand impressions, clicks and sales. Check this guide on how to improve website traffic …
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question