Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community!
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trial
Andrew Chung
5,203 PointsHow do you save multiple index.html or main.css files?
This might be a stupid question but you can't save multiple different files under the same name, index.html for instance. So if I'm going to be working on making multiple websites how do I save each index.html file?
8 Answers

Saskia Lund
5,673 PointsHi Andrew,
one possible approach could be the following:
for each website project, create seperate directories. Name those main directories/folders after the sites' domains and put all files and folders that belong to that website's structure into that main folder. Just like that f.e.:
folder1: mydomain1.de > index.html
folder2: mydomain2.de > index.html
etc.
Cheers Saskia

Saskia Lund
5,673 PointsDid you try saving with the "save file as..." menuoption and then navigate into your newly created folder and then save it? If there is no index.html located in that new folder, it should actually just save the file you are working on in there without any problems...
Jeff Ward
8,978 PointsI would personally save the index.html in separate directories. Its good practice to have separate folders/directories for websites anyways.
Website 1 folder (contents - index.html and main.css (etc))
website 2 folder (contents - index.html and main.css (etc))
Jeff Ward
8,978 PointsTry using text wrangler, or the "save file as.." I always try to manually save things when possible.
Good luck! It sounds like its an error with the saving process of sorts.
Maybe copy/paste the code into a different editor and try saving it.
Jeff Ward
8,978 PointsCopy paste it outside of the editor and use a different program. A simple text editor may work as well. Try to update sublime, perhaps its out of date.
Good luck!
Andrew Chung
5,203 PointsThanks for the super quick responses. I tried creating a separate folder but I still couldn't save it. I'm using Sublime Text 2 as my editor and I think the problem must be with the editor.
Andrew Chung
5,203 PointsI tried save file as and it wouldn't save. I figured I must be missing something but I'm starting to think there's a problem with the editor itself. Thanks for the suggestions.

Saskia Lund
5,673 PointsYou are welcome :)
MAybe its a permissions problem. Did you try and starte Sublime as administrator?
Andrew Chung
5,203 PointsI'm using sublime as the administrator. I think I'll download a new text editor and try it on there. Fingers crossed.

Saskia Lund
5,673 PointsYeah good luck ;)