using del , ren, move, and rd /s

60
Ch 6 1 Using DEL, REN, MOVE, and RD /S

Upload: yardley-pitts

Post on 31-Dec-2015

28 views

Category:

Documents


1 download

DESCRIPTION

Chapter 6. Using DEL , REN, MOVE, and RD /S. Overview. Will continue to work with internal commands that help manage and manipulate files. Overview. Will focus on the following commands: DEL REN MOVE RD /S. Overview. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 1

Using DEL, REN, MOVE, and RD /S

Page 2: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 2

OverviewOverview

Will continue to work with internal commands that help manage and manipulate files.

Page 3: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 3

OverviewOverview

Will focus on the following commands:

DEL REN MOVE RD /S

Page 4: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 4

OverviewOverview

Why and how to back up specific files, or an entire disk,

so as to not lose important data will be discussed.

Page 5: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 5

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

Keep only the files you need on your disk.

Page 6: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 6

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

DEL command used to erase unwanted files.

ERASE command works the same way DEL command works.

Page 7: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 7

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

A file deleted at the command line is not physically removed

from the disk.

Page 8: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 8

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

It is sometimes possible to recover a file deleted at the command line.

However, when DEL is used the file/s are deleted.

Page 9: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 9

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

File deleted from hard drive using My Computer or Windows Explorer is

recoverable.

Page 10: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 10

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

Files not recoverable are those deleted from:

Removable disk/s Floppy disks Command prompt

Page 11: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 11

Eliminating Files with Eliminating Files with the DEL Commandthe DEL Command

DEL command syntax:DEL [/P] [/F] [/S] [/Q] [/A [[:]

attributes]] names

Names refers to [drive:] [path] filename

Page 12: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 12

Activity—Using the Activity—Using the DEL CommandDEL Command

KEY CONCEPTS: Function of DIR Why drive letter and path not included DEL does not confirm prior to deletion

Page 13: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 13

Deleting Multiple FilesDeleting Multiple Files

DEL can be used to delete multiple files.

Separate (by spaces) files to be deleted.

Page 14: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 14

Activity—Using DEL with Activity—Using DEL with Multiple ParametersMultiple Parameters

KEY CONCEPTS: Using DIR Deleting multiple files with DEL

Page 15: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 15

Deleting Files on Other Deleting Files on Other Drives and DirectoriesDrives and Directories

The DEL command can be used to eliminate files on other drives and subdirectories.

Page 16: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 16

Deleting Files on Other Deleting Files on Other Drives and DirectoriesDrives and Directories

DEL command syntax:DEL names

Names refers to designated drives, subdirectories, and names of files you wish

to delete.

Page 17: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 17

Deleting Files on Other Deleting Files on Other Drives and DirectoriesDrives and Directories

Order and logic of syntax are important when keying in

command.

Page 18: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 18

Deleting Files on Other Deleting Files on Other Drives and DirectoriesDrives and Directories

Common error:DEL GONE.FIL B:

Should be: DEL B:GONE.FIL

Page 19: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 19

Activity—Using the DEL Activity—Using the DEL Command with Individual Command with Individual

FilesFilesKEY CONCEPTS: Using proper syntax Use of second backslash Using COPY gives two identically

named files on different drives DIR - shows file is there DEL - deletes file

Page 20: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 20

Using Wildcards with the Using Wildcards with the DEL CommandDEL Command

To delete many files at one time use wildcards with the DEL

command.

Page 21: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 21

Activity—Using the Activity—Using the DEL CommandDEL Command

KEY CONCEPTS: Use DIR prior to global erase Files deleted with DEL and wildcards

not recoverable Wildcards can be used when files are

in subdirectory

Page 22: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 22

The /P and /S Parameters The /P and /S Parameters with the DEL Commandwith the DEL Command

/P parameter with DEL command verifies prior to

each file deletion.

Page 23: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 23

The /P and /S Parameters The /P and /S Parameters with the DEL Commandwith the DEL Command

The /S parameter traverses the directory tree so files do not

need to be deleted individually throughout disk structure.

Page 24: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 24

The /P and /S Parameters The /P and /S Parameters with the DEL Commandwith the DEL Command

Again, DEL command syntax:DEL [/P] [/F] [/S] [/Q] [/A [[:]

attributes]] names

Names refers to [drive:] [path] filename

Page 25: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 25

Activity—Using /P and /S Activity—Using /P and /S with the DEL Commandwith the DEL Command

KEY CONCEPTS: Use of /P parameter Use of /S parameter Use of DIR command Can use more than one parameter at a

time

Page 26: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 26

Changing File NamesChanging File Names

Rename file because: File contents changed Want the name for another file File named incorrectly You think of a better name

Page 27: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 27

Changing File NamesChanging File Names

COPY command: Create another file with same

contents but a different name End up with file and copy of file with

another name

Page 28: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 28

Changing File NamesChanging File Names

RENAME command: Changes name of file - contents

remain the same End up with same file with a new

name

Page 29: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 29

Changing File NamesChanging File Names

RENAME command has two forms:

RENAME REN

Page 30: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 30

Changing File NamesChanging File Names

REN/RENAME syntax:

REN [drive:] [path]

[directoryname1 | filename1]

[directoryname2 | filename2]

Page 31: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 31

Changing File NamesChanging File Names

Renaming files:Two step process in My

Computer/Windows ExplorerOne step process at command line

Page 32: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 32

Activity—Using the REN Activity—Using the REN Command to Rename FilesCommand to Rename Files

KEY CONCEPTS: When destination and *.* assumed REN command vs. COPY command

Page 33: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 33

Changing the Names Changing the Names of Subdirectoriesof Subdirectories

Prior to Windows 95, REN command only worked with files.

Windows 95 REN command also used to rename subdirectories.

Page 34: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 34

Changing the Names Changing the Names of Subdirectoriesof Subdirectories

Partial syntax for renaming subdirectories:

REN [drive:] [path] [directoryname1] [directoryname2]

Page 35: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 35

Activity—Using REN Activity—Using REN Command to Rename Command to Rename

SubdirectoriesSubdirectories

KEY CONCEPTS: Command executed if no error

message Can rename subdirectories that are

within other subdirectories

Page 36: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 36

Using REN with Using REN with WildcardsWildcards

Multiple files on the same drive or directory that have a common element can be renamed using REN command with wildcards.

Page 37: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 37

Activity—Using REN Activity—Using REN with Wildcardswith Wildcards

KEY CONCEPTS: Compare ???.NEW with *.NEW Renaming multiple files in same

directory with one command

Page 38: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 38

Using RENAME on Different Using RENAME on Different Drives & DirectoriesDrives & Directories

The REN command can be used to rename any file on

any drive or directory.

Page 39: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 39

Using RENAME on Different Using RENAME on Different Drives & DirectoriesDrives & Directories

Compare: REN OLDFILE.EXT NEWFILE.EXT

REN B:OLDFILE.EXT NEWFILE.EXT

REN C:\JUNK\OLDFILE.EXT NEWFILE.EXT

Page 40: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 40

Using RENAME on Different Using RENAME on Different Drives & DirectoriesDrives & Directories

COPY - end up with two identical files in different locations.

REN - changes name of an existing file in a specific location.

Page 41: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 41

Activity—Using Rename Activity—Using Rename on Different Driveson Different Drives

KEY CONCEPTS: OS will not put a drive designator before

new file name in REN REN

Changes names not file contents Does not move files

DIR vs. TYPE commands

Page 42: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 42

Moving Files and Moving Files and Renaming DirectoriesRenaming Directories

Review of commands: MOVE used to rename a directory REN/RENAME used to rename files

and subdirectories

Page 43: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 43

Moving Files and Moving Files and Renaming DirectoriesRenaming Directories

MOVE command: Move group of files or subdirectories -

cannot change names Move individual file/subdirectory - can

change name of moved file or subdirectory Move files/directories from one directory

to another, from one drive to another

Page 44: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 44

Moving Files and Moving Files and Renaming DirectoriesRenaming Directories

Syntax to move one of more files:

MOVE [/Y | /-Y] [drive:] [path] filename1 [,…] destination

Page 45: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 45

Moving Files and Moving Files and Renaming DirectoriesRenaming Directories

Syntax to rename a directory:

MOVE [/y | /-y] [drive:] [path]

dirname1 dirname2

Page 46: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 46

Activity—Moving Files & Activity—Moving Files & Renaming DirectoriesRenaming Directories

KEY CONCEPTS: Differences between syntax of MOVE and

REN When do you use MOVE? REN? Move file in same drive/directory -

eliminates first file and replaces contents of second file with contents of first file

Page 47: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 47

Activity—Moving Files & Activity—Moving Files & Renaming DirectoriesRenaming Directories

KEY CONCEPTS: MOVE

Used instead of COPY, REN, DEL Can act like COPY Cannot change file names when used with

wildcards Cannot concatenate files Can move entire subdirectory structure

along with files with one command

Page 48: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 48

RD /S RevisitedRD /S Revisited

Two ways to remove a directory: RD (two-step process) RD /S (one-step process)

Page 49: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 49

Activity: Using RD Activity: Using RD and RD /Sand RD /S

KEY CONCEPTS: Using RD command Using RD /S command

Page 50: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 50

Backing Up Your Backing Up Your DATA DiskDATA Disk

Always back up all data files.

Backing up application program disks can be tricky, especially copy-protected disks

Page 51: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 51

Backing Up Your Backing Up Your DATA DiskDATA Disk

Special operating commands and procedures must be used

to back up a hard disk.

Page 52: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 52

Backing Up Your Backing Up Your DATA DiskDATA Disk

Three ways to back up data files: DISKCOPY COPY XCOPY

Page 53: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 53

Backing Up Your Backing Up Your DATA DiskDATA Disk

Never use the MOVE command for backup

purposes.

Page 54: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 54

Backing Up Your Backing Up Your DATA DiskDATA Disk

Develop a regular backup routine. Can use “tape backup”. Use writable CD if available

Message is BACK UP DATA FILES

Page 55: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 55

Backing Up Your Backing Up Your DATA DiskDATA Disk

Application programs can usually be reinstalled from

original disks.

Page 56: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 56

Activity—Backing Up with Activity—Backing Up with the DISKCOPY Commandthe DISKCOPY Command

KEY CONCEPTS: How to not accidentally copy hard

drive Use DISKCOPY - get 2 copies of

DATA disk

Page 57: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 57

Activity—Backing Up with Activity—Backing Up with the DISKCOPY Commandthe DISKCOPY Command

Backup disk Keep current Have two or more Check backup disk regularly

Some organizations need to recreate records

Need archival backup Need transaction history

Page 58: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 58

Backing Up Files with the Backing Up Files with the COPY CommandCOPY Command

DISKCOPY: Backs up entire floppy disk Formats new disk

Page 59: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 59

Backing Up Files with the Backing Up Files with the COPY CommandCOPY Command

COPY: Used to backup specific files Copy files from one floppy to another Does not format new disk Must not be used to copy all files from

hard disk to floppy

Page 60: Using  DEL ,  REN,  MOVE, and RD /S

Ch 6 60

Backing Up Files with the Backing Up Files with the COPY CommandCOPY Command

Do regular backups: Back up files that have changed or

are new