Spring 2005 CSCI 173 lab 3

Directories and Files

On Windows right-click on the Start and then select Explore. This will give you a tree-structured view of your computer's directories and files.

Press on the + and - in the left pane to expand and contract directories.

Navigate down the file system until you displace the directory C:\Program Files\Microsoft Office\OFFICE11. If you don't know how to do this, ask.

In the right pane, right click on ACCESS and then select Properties. When you see the ACCESS Properties window, explore the General, Security, and Summary tabs.

Go back to the OFFICE11 explorer window. In the top menu bar, click on Tools and then select Folder Options. Look at the File Types tab. (This may take a while.) Here you will see how certain extension are associated with specific Windows programs.

Right now your file extensions are "hidden". Let's turn them on. Select the View tab and you'll see an entry called Hide extensions for known file types. Turn off the check-mark and then press OK.

If you look at the right pane, you'll see that many of your files now have longer names. For example, ACCESS is now ACCESS.PIP.

These hidden extensions are significant in Windows. They are used to determine which program to start. Many security-conscious Windows users never hide the extensions, so they know which programs are run on a double click.

Creating a file

Go into the explorer and click on My Documents. It's toward the top. Create a folder name CSCI173 within My Documents. You use the FilesNew menu selection to do this.

Within your new directory CSCI173 create a new Text document and called it PlayingInLab.txt.

Go ahead and double-click on your new file. This will start up Notebad, the program associated with the extension .txt. Type whatever you want into your file and save it.

Let's try one last thing. Create a file called playinginlab.txt (note: all lower case) in your CSCI173 directory. This should not work.

What's in a name

We've already seen that extensions are a significant part of file names. There are also some restrictions on allowed file names. For example, you can't have two files within a directory that differ in only the case (upper or lower) of their file names. Let's explore this a bit more with the old-fashioned MS/DOS command prompt. It's StartAll ProgramsAccessoriesCommand Prompt to get started.

The Command Prompt will probably start you out in the H: drive. This is actually a reference to your directory as stored on the department Windows server.

However, let's go to your own computer's drive by typing the two-letter command C: which should take you to the C: drive, the hard drive on your computer.

Now you can view a file with the dir command. You most through the directories with the cd command. Use the cd command to connect, once again, to C:\Program Files\Microsoft Office\OFFICE11. If the directory to which you are connecting contains spaces, sometimes it helps to put its name within double quote marks.

If you now type the command dir command, a screenful of files will stream in from of you. Slow it down by typing dir | more or be old-fashioned and type dir/p. This time you should see the file ACCESS.PIP near the beginning of the list.

There are two rather unusual directory names in Windows which were borrowed from Unix. Your current directory can always be called ".", pronounced, of course, as "dot". Go ahead and type the command cd . and you'll see that you go nowhere.

The parent of your current directory may be called ".." (dot-dot). Now type cd .. to move to C:\Program Files\Microsoft Office. Type it again to move to C:\Program Files.

Now figure out how to get to your My Documents directory. It could be a challenge. I'd tell you, if I'd been able to figure it out. Once you are there, connect to your CSCI173 directory and type the command dir/x. Here, you will see that your PlayingInFolder.txt actually has a shorter name composed only of upper case letters. It will be something like PLAYIN~1.TXT. This is the name of your file in the MS/DOS world. On very rare occassions you may need to type this name.

Go ahead and terminate the Command Prompt window. We're done with it.

File collections

When transfering files across the internet, you really need a way to pack many folders and files into a single file. Click to download the file samp03.zip.

Extract these into your CSCI173 directory. You may need some help with this one. When the "extraction wizard" brings you to the window to Select a Destination be sure to press the Browse... button.

This will create a directory samp03 with a deep subdirectory. Navigate through that subdirectory until you find some files with the extension .class. These are Java class files.

Let's edit that index.html file up in the samp03 directory. Do this will notepad, that's StartAll ProgramsAccessoriesNotepad. Just make any change to the text of the file and save it.

Now let's ZIP your modified samp03 directory. It's not that hard. Go back to your CSCI173 directory and create a new Compressed (zipped) Folder. Then you can just drag samp03 directory. into the compressed folder.

FTP

Use WinSCP, as in Lab 1, to transfer your ZIP file to your Linux account.

Networked file systems

If you get time expore My Network Places under the Windows explorer.