Home ] FAQ ] Web Pages ] Other Sites ]

 

Files and Folders

Naming files and directories

When choosing a name for your file, it is best to make the name as descriptive as possible. For example, the name of this file (the one you are reading) is "usingFiles.html". Notice that there is no space in the filename. Most operating systems will allow you to use spaces in your filenames, but this is simply an invitation for disaster. There are many instances where using a space in a filename can cause programs to misbehave, and you should avoid this practice at all costs. If you want to name a file using several words, a simple way is to use capitalization, as in "myFavoriteFile.txt". You could also use underscores or dashes, as in "my_favorite_file.txt" or "my-favorite-file.txt".

You may have noticed that Windows has two directories with spaces in the name, "My Documents" and "Program Files". This was, in my opinion, a colossal blunder by Microsoft. I have seen it cause numerous problems, even with other Microsoft programs. Please do not follow their example.

How long should a name be? The best names are long enough to understand, but short enough to be typed. The directory that holds pictures from my digital camera could be called "picuresFromMyDigitalCamera", but this is a bit long. "Pics" is shorter, but it could be confused with the directory for pictures I download from the web. "CameraPics" works much better.

Unfortunately, the files you create for this course tend to have lousy names. The reason for this is that we still have a few students using older operating systems, and they cannot handle names longer than 8 characters. In the future, we will update the learning guide to use more descriptive names.

How do I make copies of my files so I don't send away my only copy?

Windows sometimes gets annoyed if you pull out a disk and insert another one. The easiest way to get around this is to save all files on your hard drive (C:), and copy them to a floppy when you are ready to submit.To copy files to the floppy, use Windows Explorer. In Explorer, you can copy and paste files the same way you would copy and paste text within a document. Find the files on your C drive, highlight them all, and choose copy. Then double-click on the A drive, click once on the right half of the screen (where you want the files to go), and paste.

My instructor told me he did not receive the files, even though I double-checked the disk!

Usually, this problem occurs because the files were moved around your hard drive before being copied to the floppy. When you move a file on the hard drive, Windows tries to save space by creating a "shortcut" instead of making a full copy of the file.

It is difficult to check the files by clicking on them, because shortcuts are simply directions for the location of the real file. If you are checking them using the computer where the real files are located, the shortcut will be able to find the real file, and everything will seem fine. But since I don't have a copy of the real file on my computer, when I get a disk with a shortcut, it simply gives an error saying it cannot find the file.

The trick to avoiding this problem is to look at the files on your disk and see if they are shortcuts or actual files. Shortcuts will be very small in size (usually 1KB), and often have a little arrow in the lower left corner of the icon. If you are working with shortcuts, you need to find the real files on your hard drive, and copy them to your floppy.