set tFolder to alias "Media 1TB:My Files:Junk Folder"
tell application "Finder"
delete (files of tFolder whose name is not "Sub2")
-- delete tFolder
end tell
If Sub2 is a file, then you need to add the extension.
Edited: and btw. If you don’t want to delete several files or folders, then you can use a list. i.e.
items of tFolder whose name is not in {"Sub2", "File2.txt", "Sub5", "File5.rtf"}