This question as phrased doesn't make sense, because every file in your workspace that you synced from the depot, and every file in your depot that you cloned from a remote server, is part of at least one submitted changelist.
If you want to remove all the files from your workspace that are not open in a pending changelist, that's a simple "remove from workspace" operation at the workspace root (or just p4 sync #none
at the command line). The sync
command will automatically skip files that are open, because it doesn't want to delete your work in progress.
To delete files in your workspace that did not come from the depot (i.e. files that are truly not part of any changelist, either pending or submitted), use the p4 clean
command. This will irrevocably delete these files and there will be no way to get them back (since they were never submitted to the depot for safekeeping), so make sure this is really what you want to do!
client view
are you referring to? – Chang Zhao