Presentation is loading. Please wait.

Presentation is loading. Please wait.

Ch 71 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the Text Editor.

Similar presentations


Presentation on theme: "Ch 71 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the Text Editor."— Presentation transcript:

1 Ch 71 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the Text Editor

2 Ch 72 Overview The purpose and function of file attributes will be explained.

3 Ch 73 Overview Utility commands and programs will be used to manipulate files and subdirectories to make tasks at the command line easier to do.

4 Ch 74 Overview This chapter will focus on the following commands and programs: è ATTRIB è XCOPY è DOSKEY è EDIT

5 Ch 75 File Attributes and the ATTRIB Command Root directory keeps track of information about every file on a disk.

6 Ch 76 File Attributes and the ATTRIB Command Each file in the directory has attributes.

7 Ch 77 File Attributes and the ATTRIB Command Attributes represented by single letter: è S - System attribute è H - Hidden attribute è R - Read-only attribute è A - Archive attribute

8 Ch 78 File Attributes and the ATTRIB Command NTFS file system: è Has other attributes è At command line only attributes can change with ATTRIB command are S, H, R, and A

9 Ch 79 File Attributes and the ATTRIB Command ATTRIB command: è Used to manipulate file attributes

10 Ch 710 File Attributes and the ATTRIB Command ATTRIB command syntax: ATTRIB [+R | -R] [+A | -A] [+S | -S] [+H | -H] [[drive:] [path] filename] [/S [/D]]

11 Ch 711 File Attributes and the ATTRIB Command Attributes most useful to set and unset: è R - Read-only è H - Hidden

12 Ch 712 File Attributes and the ATTRIB Command The A attribute (archive bit) signals file has not been backed up.

13 Ch 713 File Attributes and the ATTRIB Command XCOPY command can read the archive bit.

14 Ch 714 File Attributes and the ATTRIB Command è File attributes can be changed from Windows Explorer. è Easier to do these tasks from command prompt.

15 Ch 715 Activity—Using ATTRIB to make Files Read-Only KEY CONCEPTS: è Using + or - alters attribute è Cannot overwrite or delete read- only files è Can delete read-only files with /F parameter with DEL command

16 Ch 716 Using Hidden & Archive Attributes with ATTRIB H attribute used to hide file so when DIR command is used the file name is not displayed.

17 Ch 717 Using Hidden & Archive Attributes with ATTRIB Using hidden attribute allows for manipulation of files.

18 Ch 718 Using Hidden & Archive Attributes with ATTRIB More difficult to perform file operations on groups of files simultaneously in Windows Explorer.

19 Ch 719 Using Hidden & Archive Attributes with ATTRIB è The A attribute can flag a file as changed since the last time it was backed up. è ATTRIB command can set and unset this flag.

20 Ch 720 Activity—Using the H and the A Attributes KEY CONCEPTS: è Reasons for hiding files è D,R,H,A attributes used to help manage files è Use attributes with ATTRIB and XCOPY è Space between each parameter - watch spacing of command syntax carefully

21 Ch 721 Activity—Using the H and the A Attributes KEY CONCEPTS: è Rename file - keeps attributes è Copy file - does not keep attributes è Use of + and - in setting and unsetting file attributes è Eliminate/add several file attributes with one command

22 Ch 722 The SUBST Command SUBST command: è External command è Substitutes drive letter for path name è Alleviates keying in long path name

23 Ch 723 The SUBST Command SUBST command: è Installs programs that recognize disk drive but not the subdirectory è Derives information from a drive that a program does not recognize

24 Ch 724 The SUBST Command Be cautious when using SUBST with a network drive.

25 Ch 725 The SUBST Command While substitution is in effect, do not use SUBST with the following commands: è LABEL è CHKDSK è FORMAT è DISKCOPY è DISKCOM è RECOVER è FDISK

26 Ch 726 The SUBST Command SUBST command syntax: SUBST [drive1: [drive2:]path]

27 Ch 727 The SUBST Command To undo a substitution: è SUBST drive1: /D To see what has been substituted: è SUBST

28 Ch 728 Activity—Using SUBST KEY CONCEPTS: è Virtual/logical drives è SUBST å Uses logical/virtual drive letter äConceptually how networks operate å Destination - use drive letter and path äSUBST does not recognize drive letter alone as destination å When done - undo SUBST

29 Ch 729 The XCOPY Command The XCOPY Command Drawbacks of COPY command: è Reads and copies only one file at a time è Cannot copy subdirectory structure è Copied file does not retain source file attributes

30 Ch 730 The XCOPY Command XCOPY command: è External command è Copies files that exist in different subdirectories è Can specify drive as source to copy all files on drive. è Provides overwrite protection

31 Ch 731 The XCOPY Command XCOPY command: è Can be specific about characteristics of files to be backed up è Faster than COPY è By default will not copy system or hidden files

32 Ch 732 The XCOPY Command Advantages of command line over using Windows Explorer: è Drag and drop problems è Can perform file operations on group of files rather than one file at a time

33 Ch 733 The XCOPY Command XCOPY syntax: XCOPY source [destination] [/A | /M] [/D[ :date]] [/P] [/S [/E]] [/V][/W] [/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U] [/K] [/N] [/O] [/X] [/Y] [/-Y] [/Z] [/EXCLUDE:file1 [+file2] [+file3]…]

34 Ch 734 Activity—Using the XCOPY Command KEY CONCEPTS: è Recreating structure on DATA disk è Uses of /S, /D, and /M with XCOPY è XCOPY å Default confirms overwrite å Can manipulate A attribute å Can copy hidden files

35 Ch 735 Multiple XCOPY Parameters XCOPY command: è Performs file operations on hidden, system, and read-only files è Can manipulate files having one or more parameters è Used to accomplish tasks at command line that cannot be accomplished in GUI

36 Ch 736 Multiple XCOPY Parameters Next activity will copy two files to new directory that had hidden attributes set without removing the H attribute.

37 Ch 737 Activity—Using Multiple XCOPY Parameters KEY CONCEPTS: è XCOPY with H and L parameters è XCOPY with “SHRIEK” parameters è XCOPY with “SHREK” parameters è System attributes are hidden è Changing file attributes è ATTRIB - order of parameters does not matter

38 Ch 738 DOSKEY DOSKEY: è External, memory-resident command è Automatically loaded when Command Prompt window opened è Enhances command line editing

39 Ch 739 DOSKEY è DOSKEY remains in memory only during current DOS session. è DOSKEY acts like an internal command.

40 Ch 740 DOSKEY TSR (Terminal Stay Resident): è Memory resident commands è Initially works like external command è Does not release memory for duration of Command Prompt work session

41 Ch 741 DOSKEY DOSKEY: è Recalls and edits command lines è Keeps command history è Used to write a macro

42 Ch 742 DOSKEY DOSKEY syntax: DOSKEY [/REINSTALL] [/LISTSIZE=size] [/MACROS [:ALL | :exename]] [/HISTORY] [/INSERT | /OVERSTRIKE] [/EXENAME=exename] [/MACROFILE=filename] [macroname=[text]]

43 Ch 743 DOSKEY Editing Keys Command Summary KEY Up/down Arrows ESC F7 ALT + F7 F8 F9 ALT +F10 EDITING FUNCTION Recall commands Clears command line Displays command history Clears command history Searches command history Selects a command by number Clears macro definitions

44 Ch 744 DOSKEY Special codes in Doskey macro definitions: è $T Command separator è $1-$9 Batch parameters è $* Symbol replaced by everything following macro name on command line

45 Ch 745 Activity—Using DOSKEY KEY CONCEPTS: è Using HISTORY parameter with DOSKEY è Defining batch files and macros è How to have more than one command on a line in a Command Prompt Window è Closing Command Prompt window eliminates macros created in this window å Redirecting macros to batch file saves them

46 Ch 746 The Command Prompt Text Editor Word-processing program: è Used for writing needs è Allows full flexibility in creating and editing documents è Most permit saving document as ASCII text

47 Ch 747 The Command Prompt Text Editor Text or ASCII files are used to give instructions to the operating system.

48 Ch 748 The Command Prompt Text Editor Text editor: è Used to create text documents è Used to write batch files è Not a word processor å Cannot format data in document

49 Ch 749 The Command Prompt Text Editor Text editors: è Every operating system has one è NOTEPAD used on desktop è EDIT used at command prompt window

50 Ch 750 The Command Prompt Text Editor Edit text editor: è Command line interface text editor è Not a word processor å Cannot format data in documents å Cannot manipulate environment

51 Ch 751 The Command Prompt Text Editor Edit text editor menus: è Screen menu å Bar at top å Status bar at bottom è File menu å Open new or existing document å Save or print a document å Save document under new name å Exit editor

52 Ch 752 The Command Prompt Text Editor Edit text editor menus: è Edit menu åCut, copy, paste, delete selected text è Search menu å Find a specified string of text å Repeat the Last Find å Search for specified string of text å Replace string of text with another string of text

53 Ch 753 The Command Prompt Text Editor Edit text editor menus: è View menu å Split, Size, or Close Edit window è Options menu å Change Printer Port or tab Stops å Choose Colors for Edit window

54 Ch 754 The Command Prompt Text Editor Edit text editor menus: è Help menu åClick Commands to get a list of all available Edit commands åClick About to view version information for Edit

55 Ch 755 The Command Prompt Text Editor A variety of cursor movement keys and shortcuts can be used to edit a text file.

56 Ch 756 The Command Prompt Text Editor Table 7.1 Desired Cursor Movement Keys to Use Keyboard Shortcuts p. 348

57 Ch 757 Activity—Using the Command Prompt Text Editor KEY CONCEPTS: è Making mouse work è Insert Vs. overstrike mode å key toggles between two modes è Full screen editing å Using mouse and keystrokes å Selecting text

58 Ch 758 Activity—Using the Command Prompt Text Editor KEY CONCEPTS: è Viewing two files simultaneously è Creating macro è Creating batch files å To execute batch file - key in name

59 Ch 759 Using Text Data Files Use of text editor to create data: è Desired program not available è Can import text files from many programs è With recorder can record needed data in text file

60 Ch 760 Activity - Importing a Text File KEY CONCEPTS: è Imported text data into Excel è Tex Import Wizard screen used to define data


Download ppt "Ch 71 Using ATTRIB, SUBST, XCOPY, DOSKEY, and the Text Editor."

Similar presentations


Ads by Google