If you throw all your files in the htdocs folder then you should delete the 2 index files already in there - index.html and index.php - and then use your own index file after starting the Apache server.http://localhost
will then find your own index file and http://localhost/xampp
will find the XAMPP Demo Pages.
The way XAMPP is configured 'out of the box' should allow you to run cgi files from within the htdocs folder or you can use the \xampp\cgi-bin folder for your cgi scripts.
BTW if you can access http://localhost/index.html
without starting Apache then you may have installation issues or another server on port 80 localhost.
Run \xampp\portcheck.exe and see what is using the ports that XAMPP needs exclusively.http://localhost/index.html
should give the XAMPP message It Works!http://localhost/index.php
should give the XAMPP Demo Pages.
Some helpful reading:\xampp\readme_en.txt