Base the portal relationships on global fields.
e.g. subcategory portal is
g_subcategory id = subcategory id
Put a button on the Category portal so that when you click that g_subcategory id is set with the subcategory you want to view.
Follow that same principle down the line for the files.
Thanks so much for your response and sorry for not getting back to you sooner - have been away and working on other projects.
How do you recommend i have the portals set up?
Because when i create a new record that has each piece of info in it - category subcategory filename description etc. it will need to all be in one table.