Title: USING ATTRIB, SUBST, XCOPY, DOSKEY, AND EDITOR
1Chapter 7
- USING ATTRIB, SUBST, XCOPY, DOSKEY, AND EDITOR
- Page 309
27.1 File Attributes The ATTRIB Command
- ATTRIB R -R A -A S -S
- H -H drivepathfilename /S /D
- Sets attribute
- - Clears attribute
- R Read-only
- A Archive
- S System
- H Hidden
- /S Processes matching files in subdirectories too
- /D Processes the folders as well
37.2 Activity ATTRIB Command
- Begin on O drive with your Data Disk
- Your Turn
- ATTRIB .99
- ATTRIB C\.
- COPY G\WUGXP\.FIL
- ATTRIB .FIL
- ATTRIB R STEVEN.FIL
- ATTRIB STEVEN.FIL
47.2 Activity ATTRIB Command
- DEL STEVEN.FIL
- COPY G\WUGXP\.XLS
- DIR .XLS
- ATTRIB R .XLS
- ATTRIB .XLS
- Minimize the Command Window
57.2 Activity ATTRIB Command
- Start/My Computer Double click O drive
Tools/Folder Options - View - scroll down and remove Hide Extensions for
known file types OK - Scroll down to NEW-SUV.XLS file Double click on
file to open - Click in cell A-30 (box below Toyota)
- Key in Latest Thing
- Click File and then click Save
67.2 Activity ATTRIB Command
- Click OK
- Click Cancel (X box on message)
- Click File and then click Exit
- Click NO
- Close My Computer
- Click to restore the command window
-
77.2 Activity ATTRIB Command
- Key in CLS
- COPY STEVEN.FIL BETTE.FIL
- ATTRIB R BETTE.FIL
- DEL BETTE.FIL
- DEL /F BETTE.FIL
- DIR BETTE.FIL
87.3 Hidden and Archive Attributes (/H /A) with
ATTRIB
- H Hides a file from the directory display
- COPY and MOVE will not see file!
- A Archive a file
- This lets your backup know if the file has
already been backed up.
97.4 Activity Using the H and A Attributes
- Your Turn
- COPY G\WUGXP\FI.
- DIR F.
- ATTRIB FI. H
- DIR F.
- MOVE F. TRIP
- DIR /AH
107.4 Activity Using the H and A Attributes
- ATTRIB H FI.
- DIR F.
- TYPE STEVEN.FIL
- ATTRIB STEVEN.FIL
- ATTRIB A R STEVEN.FIL
- ATTRIB STEVEN.FIL
-
117.4 Activity Using the H and A Attributes
- COPY TRIP\FRANK.FIL STEVEN.FIL
- Y
- TYPE STEVEN.FIL
- ATTRIB STEVEN.FIL
- ATTRIB R A STEVEN.FIL
- ATTRIB STEVEN.FIL
-
127.4 Activity Using the H and A Attributes
- REN STEVEN.FIL BRIAN.FIL
- ATTRIB BRIAN.FIL
- COPY BRIAN.FIL STEVEN.FIL
- ATTRIB STEVEN.FIL
- ATTRIB BRIAN.FIL
137.5 The SUBST Command
- SUBST drive1 drive2path
- Undo with SUBST drive1 /D
- Use SUBST by itself to see list
147.6 Activity Using SUBST
- Your Turn
- TYPE ASTRONOMY\MERCURY\DRESS.UP
- SUBST T O\ASTRONOMY\MERCURY
- TYPE TDRESS.UP
- SUBST
- SUBST T /D
- SUBST
157.7 The XCOPY Command
- XCOPY This is an external command
- Source destination then switches
- This command is faster then the COPY command.
Why? - It is a buffered copy whereas COPY does one file
at a time.
167.8 Activity Using the XCOPY Command
- Your Turn
- DIR G\WUGXP\MEDIA
- DIR G\WUGXP\MEDIA\BOOKS
- XCOPY G\WUGXP\MEDIA MEDIA /S
- D
- DIR MEDIA
- DIR MEDIA\BOOKS
- DIR G\WUGXP\.TXT
- XCOPY G\WUGXP\.TXT /D06-01-00
177.8 Activity Using the XCOPY Command
- A
- ATTRIB .BUD
- XCOPY /M .BUD CLASS
- ATTRIB .BUD
- COPY FILE2.FP AST.BUD
- Y
- ATTRIB .BUD
- XCOPY .BUD CLASS /M
187.8 Activity Using the XCOPY Command
- Y
- ATTRIB .BUD
- COPY G\WUGXP\.TXT
- A
- DIR .TXT
- ATTRIB H SAN.TXT
- DIR .TXT
- MD HIDDEN
197.8 Activity Using the XCOPY Command
- COPY .TXT HIDDEN
- XCOPY .TXT HIDDEN /H
- A
- CD HIDDEN
- DEL .
- Y
- DIR
- DIR /AH
207.9 Multiple XCOPY Parameters
- Advantage of XCOPY is to perform file operations
on hidden, system and even read-only files
217.10 ActivityUsing Multiple XCOPY Parameters
- Your Turn
- MD HOLD
- XCOPY .TXT HOLD /H
- DIR HOLD
- DIR HOLD /AH
- XCOPY \FILE. /L
- COPY \FILE.
- ATTRIB .FP R
227.10 ActivityUsing Multiple XCOPY Parameters
- ATTRIB S .CZG
- ATTRIB .SWT S H R
- DIR
- ATTRIB
- CD \
- MD HIDDEN2
- XCOPY HIDDEN HIDDEN2 /S /H /R /E /K
- CD HIDDEN2
237.10 ActivityUsing Multiple XCOPY Parameters
- ATTRIB /S
- CD \
- RD HIDDEN /S
- Y
- RD HIDDEN2 /S
- Y
- Close the Command Prompt window
247.11 DOSKEY
- External command
- Memory resident
- Referred to as a TSR command (Terminate and Stay
Resident) - Has a bunch of switches
257.12 Activity Using DOSKEY
- Your Turn
- Close current Command Prompt window
- Open a new Command Prompt window
- Key in the following
- O
- DIR .TXT
- DIR G\WUGXP\.99
- VOL
- DOSKEY /HISTORY
-
267.12 Activity Using DOSKEY
- DOSKEY /HISTORY gt TEST.BAT
- TYPE TEST.BAT
- CD CLASS DIR .BUD CD \
- DOSKEY bbCD CLASSTDIR .BUDTCD \
- bb
- DOSKEY /MACROS gt b.bat
- TYPE b.bat
277.13 The Text Editor
- Start in a command prompt by using EDIT
- Creates ASCII text files
- Similar to Notepad in Windows
- Has a search ability
- No formatting ability however
287.14 Activity Using the Text Editor
- Your Turn
- Close any open Command Prompt windows
- Open a new Command Prompt window. Right-click
the title bat. Click Properties. - Click the Options tab
- Clear QuickEdit Mode, click OK
- Click Modify shortcut that started in this
window. Click OK - O
- EDIT
- NOTEPAGE 350 STARTS NUMBERS AT gtgt6ltlt
297.14 Activity Using the Text Editor
- Close welcome message key in the following
- This is a test.
- This is more test data.
- Press CTRL HOME
- THIS IS MORE DATA.
- Press the INSERT key
- My second.
- Press the INSERT key
- Click under the first t in the phrase test
data
307.14 Activity Using the Text Editor
- Hold left mouse button drag to end (no period!)
- notePage 352 jumps to number gtgt16ltlt
- Key in meaningless data
- On Menu bar..click File/Open
- O\PERSONAL.FIL
- Click OK
- Click Search (Menu bar)
- Click Find
- In Find What type Jones
317.14 Activity Using the Text Editor
- Click OK
- Press F3 three times
- Press ? four times
- Key in text on page 354 using spacebar to align
- Click File
- Click Exit
- Click No
- Click Yes
- Open the Command Prompt editor
327.14 Activity Using the Text Editor
- Click File/Open
- O\STEVEN.FIL
- Click View/Split Window
- Change Frank to Steven
- Click File/Save
- Click File/Close
- Place cursor in top window and click File/Open
- O\TEST.BAT then click OK
- Place cursor in bottom window and click File/Open
- O\B.BAT then click OK
337.14 Activity Using the Text Editor
- In top window, delete first line and last two
lines - In bottom window, alter the line as on page 356
- Save both files. Close both files. Exit the
editor. - Close Command Prompt. Open Command Prompt. Make
O\ the default drive. - Key in bb
- Key in B
- Close the Command Prompt window.
347.15 Using Text Data Files
- Text files are a way of recording data
- Text files take up very little space
- Next we will look at spreadsheets
357.16 Activity Importing a Text File
- Your Turn
- Open the Microsoft Excel Program
- Click Data
- Click Import External Data (or Get External Data)
- Click Import data (or Import Text File)
- Click in drop down box and navigate to G\WUGXP
- Double click PLANETS.TXT
- Click Next
367.16 Activity Importing a Text File
- Click to clear the Tab check box
- Click the Comma check box
- Click Next
- Click Finish
- Click OK
- Click File/Exit
- Click NO
37Chapter 7 Exercises
- Blackboard T/F, CP MC Page 362
- Blackboard PS I Page 363
- Do PS II Page 369