0% found this document useful (0 votes)
35 views

What Is A File

A file is a group of organized data considered as a single unit. Files have specific extensions associated with their type, such as .doc for text documents and .exe for executable programs. Files can be created, read, renamed, and deleted using commands in MS-DOS such as COPY CON to create, TYPE to read, REN to rename, and DEL to delete. File names can use letters, numbers, and some symbols and have a maximum length of 8 characters for the base name and 3 for the extension.

Uploaded by

muhammad hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
35 views

What Is A File

A file is a group of organized data considered as a single unit. Files have specific extensions associated with their type, such as .doc for text documents and .exe for executable programs. Files can be created, read, renamed, and deleted using commands in MS-DOS such as COPY CON to create, TYPE to read, REN to rename, and DEL to delete. File names can use letters, numbers, and some symbols and have a maximum length of 8 characters for the base name and 3 for the extension.

Uploaded by

muhammad hassan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

What is a File

A group of organized data (records) which are


assembled for one particular purpose and considered as
one unit
File types and extensions
 All files ending in one of the following supplies: BAT, EXE, COM are directly
downloadable and executable.

Here are some of the types that need their full filenames:
 . Bat Batch file commands in batch (batch).
 .COM program file (COMMAND).
 .EXE file ready (executable).
 .DOC text or document file .
 .ASM is a program source file written in assembly language (ASSEMBLY).
 .BAK backup file (BACKUP).
 .BAS Program File (BASIC).
 .DBF DATABASE FILE (DBASE FILE).
 .PAS is a program file written in Pascal (PASCAL) language.
 .SYS System Configuration File (SYSTEM).
 .C source file written in C language.
programming languages
Symbols used to name files:
 1- The alphabet from A to Z (whether small or large).
 2- Numbers from 0 to 9.
 3- Some signs like: ({}, (), &,%, $, #,!).

Conditions to be observed for naming files:


 1- The length of the main file name is 1-8 characters long.
 2- The extended name - if any - should not exceed 3 characters.
 3- To separate the basic name from the extended name - if any - with a
period sign (.).
 4- To write the basic name and the extended name without spaces.
 5- Do not use the control keys (ALT, CTRL, ESC) in any name.
 6- Do not use the reserved names for the operating system, such as
CON for keyboard and display, or PRN for the name of the printer.
 7- Not to use symbols of special significance for the operating system,
which are *, /, \, +, =,?).
Creating Files in MS DOS
For creating the files in DOS, the command COPY CON is used .
Syntax:
◦ COPY CON (path of filename. Extension)
Note: File name should not exceed eight characters excluding
three characters for extension

example
d:\ copy con c:\ ff.txt
Reading Files in MS DOS
 For reading the Pre-created files in
MS DOS, we use the TYPE command.
 It displays all the contents that are
in the file>
 Note: This command displays text
 files, but EXE-COM-SYS files cannot
 be displayed.
Syntax :
◦ TYPE (path of the file . Extension)
example
d:\ type c:\ ff.txt
Creating Files in MS DOS
For creating the files in DOS, the command COPY CON is used
Syntax:
◦ COPY CON (path of filename. Extension)
Note1: File name should not exceed eight
characters excluding three characters for
extension

◦ example
c:\ copy con c:\ ff.txt
Note2: After creating it in order to saving
it, we press the two keys
( ctrl + Z)
Renaming Files

 For renaming the files in MS DOS we use the REN


Command

 Syntax:
 REN oldfilename newfilename

 ◦ example
 D:/>ren tt.txt tt1.txt
 D:/>ren tt.txt tt.doc
Deleting Files in MS DOS

 For deleting files in


 MS DOS we use the
 DEL command

 Syntax :
 ◦ DEL Filename

 ◦ example
 D:/>del tt1.txt

You might also like