Changing the website URL to the root folder

If I understand it correctly you want to transfer the site from www.example.com/test/wordpress to the www.example.com.

To do so you have to have access to FTP or CPANEL/PLESK to actually cut files from the old location to the new. When you finished that you can use this tool to make the correct changes to the database( including the serialized part).

Then remove the index.html file and you would be good to go.

This is the tools I used search-and-replace