|
[ Versión española | Deutsche Version | Versão em
Português | Version en Français ] One of the most exciting features available to homesteaders is the ability to create and use subdirectories in your GeoCities homestead. This gives you greater flexibility in managing your files, such as using a common "images" directory for all your GIF and JPG files, and a sounds directory for your WAV and MID files. Below are some important points to remember while working with subdirectories and your GeoCities account. Frequently Asked QuestionsHow do I create subdirectories?While logged into the File Manager scroll down (if needed) to the command buttons directly underneath the file listing. There you will find a button titled "Create Subdirectory". Just click that and follow the prompts on the page for naming the subdirectory. If you are using FTP, the exact method will depend on what software you are using. For example, in WS_FTP LE you click the "MKDIR" button and enter a name in the dialog box that pops up. Check the documentation for your program for exact details on how to do this. How many subdirectories can I have?Directories take up space on the hard drive, just like files do, so the number of directories you can have is limited by your hard drive space available. In reality and practice, the more directories you have, the more confused you will probably get. Try to keep the number to as few as you need to keep your files organized. For example, a subdirectory called images could hold all your GIF and JPG files, while one called sounds could hold your MID and WAV files. In some cases, Java Applets will want to have subdirectories in order to work properly. The only real answer is whatever works best for you. What can I name my subdirectories?Naming subdirectories is very much like naming files. You can use any letter or number, upper or lower case and underscores ("_"). Remember, just like everything else on GeoCities, subdirectory names are case sensitive. This means that you can have a subdirectory named Images and another named images at the same time. We recommend keeping them as short as possible, which makes it easier for you when typing it in repeatedly. (Imagine having a subdirectory named "Graphical_Image_Files" and having to type that in before every graphic you use on your page!). Can my subdirectories have subdirectories?Yes! In fact, some Java Applets must be able to do this. However, you can only nest subdirectories two deep. For example, if my homestead is in SiliconValley/Heights/7493 (which it is), I can have 7493/images/gifs but I can't have 7493/images/gifs/large (3 deep). Even with this limitation, though, you should have more than enough flexibility to do what you want with your site. How do I upload files to my subdirectories?There are two methods for uploading files - EZ File Upload and FTP. EZ File Upload only works if you have Netscape Navigator version 2.0 or higher and Internet Explorer 3.02a and higher. It may not work with other browsers. EZ File Upload - Netscape/Internet ExplorerIf you are using Netscape, all you need to do is click on the button that shows the subdirectory name (at the top of the file listing) to display that directory. Once in the correct directory, upload your files with EZ File Upload just as you always do. FTP - All Other BrowsersUpload your files to GeoCities just like you always do, making sure to change to the directory that you want to upload your files to first. How do I move existing files to a subdirectory?After you have created a subdirectory (see above) you can move existing files into it in the File Manager by checking the box on the left of each file to be moved, then clicking the "Move to Subdirectory" button underneath the file listings. You will be presented with a confirmation screen that includes a drop down list. Choose the name of the subdirectory to move the listed files to and confirm. Note: to move files from a subdirectory back to the directory above, choose the "Up One Level" destination from the drop down list. If you wish to change your homestead gradually, you can use the "Copy to Subdirectory" button to copy files, rather than moving them. For example, you could copy all of your graphics to your "images" subdirectory, then work on updating your HTML files to include the subdirectory references one at a time. When you finish updating all of your files, then you can go in and delete the graphics from your root directory, all the while leaving your existing pages looking good for visitors. How do I reference files in my subdirectories?This part can be a little tricky, but once you catch on to the logic behind it, you should have no problem. If I am working on my index.html file, and I want to set the background to a graphic in my pictures subdirectory named background.gif, then I would use the following code in my <BODY> tag: <BODY BACKGROUND="pictures/background.gif"> Note that there is no "/" before the name pictures. I repeat, because this very important, there is no "/" before the name pictures. Path names for subdirectories are relative to the location of your html file. Anything starting with a "/" indicates the very top level of the www.geocities.com server. If I had put the above link as BACKGROUND="/pictures/background.gif" then the browser would try to find the file background.gif in the GeoCities /pictures directory, not mine. Another useful tag when working with subdirectories is the double dot "../" directory reference. If you have an html file in a subdirectory, and you want to refer to a picture in another subdirectory that is off your main directory, then you would reference the file as "../pictures/background.gif". In this case ".." refers to "one level up" in the directory structure.
Perhaps a diagram would help explain things a little. The picture on the left is a partial diagram of GeoCities directory structure for this site from the very top down. So, if my index.html file is located in /SiliconValley/Heights/7493 and I want reference a graphic in the pictures subdirectory, I could enter in one of two ways: Either "/SiliconValley/Heights/7493/pictures/background.gif" OR just "pictures/background.gif". In my book, shorter is better, and since the browser knows what directory it loaded the index.html file from, just using the short, second version is much easier. Now, if I have a file in the "ws_ftp" subdirectory, and I want to reference a file in the "pictures" subdirectory, then I would reference it as follows: "../pictures/background.gif", or the long version of "/SiliconValley/Heights/7493/pictures/background.gif". Again, there is no right or wrong in how you reference the files in your subdirectories. It's simply a matter of finding out what is most comfortable for you that works, and going with it. If you prefer to use the longer version to keep from getting confused, that is certainly your option. If you are comfortable with using the short forms, then by all means, do so. Either way will work just the same from the viewer's perspective.
Do I have to have an index.html in each subdirectory?This answer to this is "Yes" and "No". No, I'm not trying to be funny, it just depends on what you are doing with the subdirectories. If you create a subdirectory just to hold your graphics files, then no, you don't need an index.html file. If, by chance, someone points their browser at that subdirectory, then they will just see a directory listing of the files in that subdirectory. If, on the other hand, you want to divide your homestead up for various members of your family, then each subdirectory could have an index.html file. Say, for example, that I have an account for my family, The Smiths. My member name at GeoCities is "the_smiths". Since I have GeoPlus (or I wouldn't be worrying about subdirectories), then the URL (address) of my home page would be "http://geocities.datacellar.net/~the_smiths". Now, with subdirectories, I can give each of my two kids, John and Jane, their own personal home pages within the homestead. I create two subdirectories, john and jane, and create an index.html file in each subdirectory for that kid. Their home page addresses would then be "http://geocities.datacellar.net/~the_smiths/john" and "http://geocities.datacellar.net/~the_smiths/jane". Without that index.html file, visitors would only see a directory listing of the "jane" or "john" subdirectories, and not the actual home pages. What if I want to rename or delete a subdirectory?Using the command buttons at the bottom of the file listing, you can delete and rename subdirectories for the current level. In other words, if you are in your root/main directory, and you have a subdirectory called "java_app" that you no longer need, you can delete that by clicking on the "Delete Subdirectory" button, then choosing that subdirectory from the drop down list presented on the next page. If subdirectory "java_app" has a subdirectory called "support", you must change to the "java_app" directory first, then click "Delete Subdirectory" to delete just that subdirectory. [ GeoCities Home | AnswerPoint
FAQs ]
|
You are visitor number
since October 10, 1998. |