Some simple DOS commands
-
Copy
This is a very useful command for getting a file moved from one place to
another.
-
Syntax; copy filenamefrom filenameto; where filename is a file in the current
directory
-
Copy is frequently used with wildcard characters * and ? to move many files
at once. For example the DOS helper ARCHIVE.BAT copies files from the current
directory to the archive directory.
-
Dir
This sends a list of files in the current directory to the screen or to a
file if the redirect > is used.
-
Syntax; dir
-
May be used with a filename to only show that one file.
-
May be used with wild card characters to show files with a common character
or characters
-
For example dir *.doc lists all files with a .doc file extension and dir
???0512.doc lists all files with any three characters followed by 0512.doc.
-
Exit
This command exits DOS and returns to Windows. It does not seem to work in
helpers .BAT commands and must be typed in at the prompt.
-
Cd
Change directory, or folder
-
Syntax; cd ..
Note: a space then two periods after the cd. This moves up one directory
level toward the root directory
-
Also cd c:\xxx\xxx changes to a folder at the xxx\xxx path.
|
How to make a DOS script for Stk2000's helpers menu
-
From the Main form click File; Edit then click Cancel on the File-Open dialog
box to get a text box to work in.
-
Click in the text box to give it focus then enter your list of DOS commands.
-
Click File; Save As, and enter a file name of your choice but give it the
.BAT file extension.
-
After entering the filename, click Ok on the File-Save dialog box.
-
Temporarily change the folder with focus by clicking File; Open then double
click on one of the folders that does not have focus, then double click back
to this folder so that the new .BAT file will show up there.
Making sure you can remember what the helper script does
-
DOS scripts are so simple and easy to write that you can get carried away
and create tons of them. After awhile you will forget what they all do. Always
write a hlp file that you can click on from the Helpers; Help menu so that
you can easily see what each one does.
-
To write a Help file to go with your newly created DOS script, click File;
Edit then enter the file name of the DOS script you are writing a Help file
for.
-
When the DOS script appears in the text area type in your documentation for
the script.
-
After the description of the script's function, save the help file but change
the file extension to .hlp.
-
Click File; Save As; then in the file-name text area enter the script name
with a .hlp file extension. The .hlp extension causes the help file you just
created to show up in the Helpers; Help menu.
Get a DOS for dummy's book and GO with it !!
-
It is not necessary to learn DOS to use Stk2000 but knowing a few DOS commands
can be very helpful and allow you to produce scripts to reduce your workload
tremendously.
|