The USB files need to be in the same directory as your project and it works best if each project has a directory of its own.

Does this example help any?
http://www.picbasic.co.uk/forum/cont...USB-SD-LOGGING