Word Processing - Computer Science

Download Report

Transcript Word Processing - Computer Science

File Management &
Windows Explorer
What we’ll cover for this lecture topic:
– Files and file management
•
•
•
•
•
File types
Using files
File naming conventions
File organization/hierarchy
Future Trends
– Windows Explorer (tool)
Excellent tutorials!
important concepts!
COMP 4—Power Tools for the Mind
Very
What’s in the Box?
Power Tools 1
Files and File Management
File types
• Soon you will learn how five different kinds of data
can be represented in a computer.
• How do we organize this data? It is all just a bunch
of 0s and 1s, no?
– Yes, but we logically organize these 0s and 1s into files.
• Computer files are storage containers that hold all
the 0s and 1s that represent all the data that belong
to a single document or to a program.
– DOCUMENT files
– PROGRAM files (executable / source)
• Kept track of by Operating System (OS)
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 2
• DOCUMENT files
– created by an application program.
– alphanumeric characters, numbers, pictures, sounds.
• PROGRAM files (executable)
– created by an programmer
– called Executable files
• stored as machine code
• ready to be executed by CPU (“compiled” code)
• examples:
– application programs (Apps)
– operating system programs (OS)
– utilities (compression utility; backup utility; etc.)
– some run at a user’s request; others at a program’s request
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 3
• PROGRAM files (source)
– created by an programmer
– called Source files
• usually stored as a readable text file (e.g. ASCII)
• need translation before they can be executed by CPU
• Example source files:
– program source files
• Turing (e.g. later you will write Turing programs)
• Java / C / C++
– script languages
• JavaScript / VisualBasic Script
– batch files
• bunch of commands stored in a text file.
• automatically-executed batch file: “autoexec.bat”
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 4
Using files
First, two important digressions:
• Recall two-level storage:
– Primary memory:
“memory”
– Secondary memory (auxiliary): “storage”
• Recall from Chapter 1-A (pp 11-13) that
software also has two basic levels:
– Applications software
like Word, Excel, or Quake
– Systems software
the operating system
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 5
OK: so what happens in storage as we use
computer files?
• You turn the computer ON:
– System boot-up happens …
– Power reaches chips on the main
circuit (mother board).
– one chip is ROM memory that
contains a bootstrap program
– it instructs the processor how to
copy (e.g. load) the operating
system from the disk to the main
memory
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 6
COMPUTER SYSTEM
Processor
Input
Main Memory
Volatile
Non-Volatile
bootstrap
program
Output
Auxiliary Storage
- OS programs:
- Kernel (main supervisor)
- Application program loader
- Copy, Rename, Move, … routines
Also provides
inputs
- APPS: Word Excel
PPT
- DATA files: Letter MyPic
COMP 4—Power Tools for the Mind
Quake
Budget
What’s in the Box?
Also saves
outputs
Power Tools 7 7
• Next, you want to create a new text document.
– What’s in memory now?
– Tell the computer to Start M.S. Word.
• Other terms for Starting:
Launch; Load
• What will happen INSIDE THE BOX when
Word is launched?
Proc.
– Hint: Where is the MS WORD program stored even
before you switched the computer on? Where must it
be stored (be copied to) so that we can use it? Why?
Main Memory
Auxiliar
y
Storage
– Remember: electronic memory is 1,000 to 100,000
times faster than electromechanical storage.
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 8
• Exactly WHAT part of the computer system do
you, the user, give this request to?
– Hint: what part of the computer system knows
how to handle that request?
• In what ways can the user make that request?
Demo:
Different ways to start a file.
Digression:
What kind of file is MS Word?
How do you know which apps are currently
open?
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 9
– SO… MS Word provides a blank document
window. You enter some text.
• Where is that text being stored?
• What happens if the machine freezes up (crashes)?
– PROTECTON ?
• SAVE the document to
a floppy or to the harddrive!
• SAVE regularly!
Proc.
Main Memory
Auxiliary
Storage
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 10
– OK, so you save the text document.
• Which two things happens “in the box” when you Save it?
• What kind of file is it?
• How many copies of that “file” are in existence at this
moment, and where are they stored?
• You make lots of changes to your document.
– Where are those changes being stored?
• OK, finished with your changes. What
are your 3 options here?
• Save
Proc.
– Replaces disk file with edited file.
Main Memory
• Just Close. Don’t save.
– Why would you want to do this?
• Save As
– Keep original: store newly edited file
under a different name
COMP 4—Power Tools for the Mind
Auxiliar
y
Storage
What’s in the Box?
Power Tools 11
– Now you want to open (in addition) a data file
you saved yesterday.
• First, where is it now? What happens “in the box” when
you open it? Where is it then?
– You’re finished with the first document ...
• What is the minimum I should close to free main memory?
• Exactly what happens “in the box” when
you only close that document?
Proc.
• Why not quit the application?
• What is the difference between
Main Memory
closing a document and closing
a program?
Auxiliar
y
Storage
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 12
– You’re finished doing word processing for this
computer session.
• What could you do now to free up memory? How?
• Exactly what happens “in the box” when you do that?
• How can you tell by looking at the desktop?
– What happens if I delete (‘recycle’) a file:
• from the hard drive?
OS “moves” it to the recycle bin from
where can potentially be restored
later.
• from a floppy disk?
Not moved to recycle bin. Cannot
easily be restored.
COMP 4—Power Tools for the Mind
Proc.
Main Memory
Auxiliar
y
Storage
What’s in the Box?
Power Tools 13
– In these previous examples
• Things keep moving around from one type of MEMORY
to another.
• Later, we’ll examine more closely WHY we have
different types of memory, what they are, and what they
are good for.
Using Files interactive lab – see Lab-03
– What happens “in the box”: save, save As, move,
copy, delete, etc.
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 14
File naming conventions (Win)
Rules determined by the OS
– Early PC days ….. Dreadful: “eight dot three”
– Windows 95/98/2000/XP:
•
•
•
•
Up to 255 characters (including the extension).
Letters, numbers, most symbols except \ ? : “ < > |
Not case sensitive
Com1 Com2 Aux
Cannot use reserved words
– Filename extensions
Lpt1 Prn Nul
• Tells Windows OS what the file format is.
• Some examples: (see text for more)
UNHIDE
Folder
view
.exe
.sys
.doc
.jpeg
.wav
.com
.drv .dll
.txt .xls
.gif .tif
.mid .mp3
COMP 4—Power Tools for the Mind
--Executables that user can run
--Executables that user cannot run
--Text and spreadsheet file formats
--Graphics file formats
--Sound file formats
What’s in the Box?
Power Tools 15
File naming conventions
(Others)
Again, rules determined by O.S.
– Mac OS
•
•
•
•
Up to 31 characters
Letters, numbers, most symbols except
Case sensitive
No reserved words
:
– Unix
• From up to 14 to 256 characters (depends on version)
• Letters, numbers, most symbols except
\ ? “ < > | * ! @ # $ % ^ & ( ) { } [ ] ;
– no space allowed (sort of...); confuses the command line
• Case sensitive
• Reserved words depend on version
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 16
File organization
• Traditional file organization
– Early Operating systems for PCs:
• Remember what application you used; launch it first; then
open data file.
• Organizing files: tendency to keep docs filed w/apps.
– Is that particularly useful to USER? Why or why not?
• Document-centric file organization
– Thanks to newer OSs:
• Open data file-- automatically launches app that created it.
• SO WHAT? Why is this more useful to the user?
“Documentcentricity”
COMP 4—Power Tools for the Mind
Play With
Extensions
Power Tools
What’s in the Box?
17
LOGICAL file storage/organization
• OS keeps a directory for each disk:
– A list of files stored on that computer disk
– Where OS keeps track of each file (fname, date,
time, size…)
– Logical view of data storage.
– Later we will look into how the OS maintains
their physical location on the disk (clusters).
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 18
• Logical organization--way to organize &
visualize where folders and files are stored on a
disk….
– the OS helps us to do this
– incorporates a hierarchical organization….
– Metaphor: sideways tree…. (next slide)
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 19
Metaphor: Hierarchical file org.
Trunk
- Root directory
- Disk drive or partition.
Each ID’d by letter.
What’s typical?
Branches
- Subdirectories (aka:
Folders):
Can be directly under
root directory
File specifications (paths):
D:\Homework\Comp 4\Lab 3
D:\Letters\Family\Mom.doc
File spec for John.doc?
Study text reading carefully before doing
Lab-03.
COMP 4—Power Tools for the Mind
(main branch).
Can be “nested” inside
other subdirectories.
(branch off main branch).
Leaves
- Files
What’s in the Box?
Power Tools 20
Windows Explorer Demo
• File Management Tool in Windows
9x/Me/2000/XP
• Some useful shortcuts: Microsoft website
• More in Lab 3
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 21
Future Trends
• Traditional: Hierarchical file org restrictive
– Why?
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 22
Future Trends
• New Approach: Database style organization
– Efficient search
– Not a rigid hierarchy
• Desktop Search Tools (c. 2005)
–
–
–
–
Google Toolbar
Yahoo Toolbar
Microsoft – MSN Toolbar
Picasa (Google) for photos/videos
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 23
Future Trends
• Coming Soon: Database style organization
inside the operating system
– Apple: Tiger Spotlight (2005)
– Windows: Longhorn WinFS (2006?)
COMP 4—Power Tools for the Mind
What’s in the Box?
Power Tools 24