Thursday, February 11, 2016

Microsoft Disk Operating System - Process to Delete / Rename Files

 Microsoft Disk Operating System - MS DOS

Microsoft Disk Operating System was written by Bill Gates &
Paul Allen, in the early 1980. It was used on 16 bit PCs built around
Intel' s 8086 & 8088 microprocessors.DOS  was Introduced by IBM in
1981 for their Personal Computers.

 Process to Delete Files- (DEL / ERASE) -

The DEL or EREASE Command is used for deleting file from the disk.
Syntax - DEL[Drivce:][PATH]<File Name>

Example -: C> DEL NEWFILE.TXT <Enter>
Del Command will remove the file New File.Txt from the Disk.

Ex-: (DEL) Delete hh File from y
xyz> cd y
xyz\y> del hh
cd..
tree / f
Answer- x - x1, x2, ff
y - y1, y2
z - z1, z2
-----------------------------------------------------------------
For Example - Delete hh file from the Vijay.
Shivam> cd vijay
Shivam\Vijay> del hh
cd..
tree / f
Answer - Shivam
Ajay - h1, h2, ff
Vijay - h3, h4
Suresh -h5, h6
------------------------------------------------------------------
Process to Rename File -  (REN)
The Rename Command is changed the name of a file to a new name.
Syntax - REN[DRIVE:][PATH]<OLD File name>
Example- : C>REN OLD FILE .TXT NEWFILE <Enter>
EX :- (REN) ff file of x renaming with gg.
xyz > cd x
xyz\x > ren ff gg
cd..
tree / f
Answer- x -x1, x2,  gg     y-y1, y2       z-z1,  z2

For Example- ff file of Ajay Renaming with gg
Shivam> cd ajay
Shivam\ajay > ren ff gg
cd..
tree/f
Answer- Shivam-
Ajay - h1 , h2, gg
Vijay - h2 , h3
Suresh - h5, h6
------------------------------------------------------------------

3 Sub Directory in 1 Root Directory and 2- 2 Files in 3 Sub Directory

Ex- 3 Sub Directory in 1 Root Directory and 2- 2 Files in 3 Sub Directory.
Root Directory – xyz
Sub Directory –  x- x1, x2
                             y- y1, y2
                             z- z1, z2
: \ > md xyz
: \ > cd xyz
: \ xyz >md x
: \ xyz >md y
: \ xyz >md z

: \ xyz > dir/b
xyz > cd..
xyz > cd x
xyz \ x copy con x1>
…………………………
………………………………
Ctrl  z
x > dir/b
x1
xyz \ x copy con x2 >
…………………………
………………………………
Ctrl z
x > dir/b
x1
x2
cd.. ( for exit x)
xyz > cd y
xyz \ y copy con y1>
…………………………
………………………………
Ctrl Z
x > dir/b
y1
xyz \ y copy con y2>
…………………………
………………………………
Ctrl z
y > dir/b
y1
y2
cd.. ( for exit y )
xyz > cd z
xyz\z copy con z1>
…………………………
………………………………
Ctrl Z
z > dir/b
z1
xyz \ z copy con z2>
…………………………
………………………………
Ctrl z
z > dir/b
z1
z2
cd.. ( for exit z)
> tree/ f
 ANSWER-
Root Directory – xyz
Sub Directory –  x- x1, x2
                             y- y1, y2
                             z- z1, z2

For Example:-  3 Sub Directory in 1 Root Directory and 2- 2 Files in 3 Sub Directory

Root Directory – Shivam
Sub Directory –  Ajay - h1, h2
                             Vijay- h3, h4
                            Suresh- h5, h6
: \ > md Shivam

: \ > cd Shivam

: \ Shivam >md Ajay

: \ Shivam >md Vijay
: \ Shivam >md Suresh

: \ Shivam > dir/b
Shivam > cd..
Shivam > cd Ajay
Shivam \ ajay copy con h1>
…………………………
………………………………
Ctrl  z
ajay > dir/b
h1
Shivam\ ajay copy con h2 >
…………………………
………………………………
Ctrl z
ajay > dir/b
h1
h2
cd.. ( for exit ajay)
Shivam > cd vijay
Shivam \ vijay copy con h3>
…………………………
………………………………
Ctrl Z
vijay > dir/b
h3
Shivam \ vijay copy con h4>
…………………………
………………………………
Ctrl z
vijay > dir/b
h3
h4
cd.. ( for exit vijay )
Shivam > cd suresh
Shivam \ suresh copy con h5>
…………………………
………………………………
Ctrl Z
suresh > dir/b
h5
Shivam \ suresh copy con h6>
…………………………
………………………………
Ctrl z
suresh > dir/b
h5
h6
cd.. ( for exit suresh)
> tree/ f
 ANSWER-
Root Directory – Shivam
Sub Directory –  Ajay - h1, h2
                             Vijay- h3, h4
                             Suresh- h5, h6
-----------------------------------------------------------------------

x1 file of x will be display in the file y with the name of hh

Ex.1 - x1 file of x will be display in the file y with the name of hh -

> cd x
xyz\x> copy  x1  c:\  xyz \y\hh
xyz\x> cd..
xyz> tree/f

Answer - xyz
x - x1 , x2
y - y1 , y2 , hh
z - z1 , z2

For Example -  h1 file of Ajay will be display in the file Vijay with the name of hh.

> cd Ajay
Shivam\Ajay> copy  x1  c:\  Shivam \Vijay\hh
Shivam\Ajay> cd..
Shivam> tree/f

Answer -
 Shivam
Ajay - h1 , h2
Vijay - h3 , h4 , hh
Suresh - h1 , h2

----------------------------------------------------------------------------------------------
Ex -2.  hh file of y disply in the ff name in the x

xyz> cd y
c:\xyz\y> copy hh  c:\  xyz \x\ff
xyz\y> cd..
xyz> tree/f

Answer - xyz
x - x1 , x2 , ff
y - y1 , y2 , hh
z - z1 , z2

For Example -  hh file of Vijay disply in the ff name in the Ajay

Shivam> cd vijay
c:\Shivam\vijay> copy hh  c:\  Shivam \Ajay\ff
Shivam\vijay> cd..
Shivam> tree/f
Answer - 

Shivam
Ajay - h1 , h2 , ff
Vijay - h3 , h4 , hh
Suresh - h5 , h6

----------------------------------------------------------------------------------------------

Ex - 3.  Disply the content of x1 , x2 , y1 , y2 , z1 , z2 , ff , hh etc
xyx> cd x
c:\ xyz\x> type x1
-------------  --- ---- 
---- ---- ----
xyz\ x> cd..
xyz> tree/ f 

Ex - 3.  Disply the content of h1 , h2 , h3 , h4 , h5 , h6 , ff , hh 

Shivam> cd Ajay
c:\shivam\ajay>type h1
----------- ----------- ---------
-------- ------- ------ ---
Shivam\Ajay> cd..
Shivam> tree/f

3 Sub Directory in the 1 Root Directory

3 Sub Directory in the 1 Root Directory -
Root Directory - abc
Sub Directory- x, y, z
:\ md abc
:\ cd abc
:\abc>md x
:\abc>md y
:\abc>md z
:\ abc>dir/b
abc>cd..

For Ex- 3 Sub Directory in the 1 Root Directory -

Root Directory- Shivam
Sub Directory- Ajay, Vijay, Suresh
Ans- 

:\ md Shivam
:\ cd Shivam
:\Shivam> md Ajay
:\Shivam> md Vijay
:\Shivam> md Suresh
:\ Shivam > dir/b
Shivam > cd..

Monday, February 8, 2016

DOS- Attrib Command

Attrib Command -

C : \ ABC \ Attrib + H ( File Name )
+ H                   -             Hidden
- H                    -             Unhidden
+ R                   -             Read Only
- R                    -             Read Write

1. Hidden File- (+h)

Ex-  Z1 Hidden in to Z
xyz > cd z
attrib +h  z1
cd..
tree / f
For Example- h5 hidden in Suresh
Shivam > cd suresh
attrib +h  h5
cd..
tree / f
Answer-   Ajay - h1, h2
                 Vijay- h3, h4
                 Suresh-  h6

2. Unhidden (-h)

Disply the hidden file Z1 in to Z
xyz > cd z
attrib - h  z1
cd..
tree / f
For Example- Disply the h5 hidden file in Suresh
Shivam > cd suresh
attrib -h  h5
cd..
tree / f
Answer-   Ajay - h1, h2
                 Vijay- h3, h4
                 Suresh- h5, h6

3. Read Only (+ r)

Ex- Read Only File X1 in X
xyz >cd  x
attrib +r  x1
edit  x1
Go to File - Alt + F
For Exit   - Alt + X

For Example-  h1 Read Only File  in Ajay

Shivam > cd Ajay
attrib +r  h1
edit  h1
Go to File - Alt + F
For Exit   - Alt + X

4. Read and Write (-r)

Ex- Read and write X1 in X
xyz >cd  x
attrib -r  x1
edit  x1
For Example-  For Read and Write  h1  in Ajay
Shivam > cd Ajay
attrib -r  h1
edit  h1
----------------------------------------------------------

Tuesday, February 2, 2016

DOS- BATCH FILE

DOS- BATCH FILE

Syntax -

copy con file name. bat

example -

copy con k1.bat
md AAC                 AAC - root  
cd AAC
md k2                    k2,k3,k4 - Sub
md k3
md k4
cd k2 -    copy con f1
                copy con f2
cd..
tree / f
Ctrl + Z (Save)