If you want to close all windows(splits) except the current one:
:only
If you want to close all tabs except the current one:
:tabonly
If you want to delete all hidden buffers (files open but not visible in any window on any tab), you'll have to add a function to your vimrc. Some people have posted possible functions to herehere and herehere
I'm not sure exactly which of these you were trying to accomplish, but hopefully some combination of these commands does the trick.