1
votes

Is there a command line option, in Perforce, to delete multiple workspaces at once?

I have many workspaces that are not in use anymore. I would like to run a command that can delete all workspaces - where the workspace name can be an input string from a txt file. Is this possible?

Being new to P4, What I have tried (and failed) so far is: p4 -x client -d -f c.txt where "c.txt" is the text file that contains the list of workspaces to be deleted.

Thanks.

1
what error do you get from your command?Chance

1 Answers

1
votes

The -x flag says to read Perforce commands from a file line by line. In this case you're asking it to read commands from a file named "client".

I think what you really intended to do is change c.txt from a list of clients to be deleted to a bunch of lines saying:

client -d -f client1
client -d -f client2
...

That would allow you to use the command p4 -x c.txt