Jump to content

M-Pixel

Members
  • Posts

    33
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by M-Pixel

  1. `% { rm $_ }` does not work from a cmd file. Also, `rm` will only work on Windows if you've installed unix command line tools, which is not a prerequisite for using Plastic. Many people will not have that command available. Here's a "hard reset.cmd" that I use on Windows: @echo !!!!!!!!!!!!!!!!!!! @echo !!!!! WARNING !!!!! @echo !!!!!!!!!!!!!!!!!!! @echo You are about to delete all ignored and private files. @echo Please make sure that you haven't forgotten to check in or shelve any of them. @pause for /F "usebackq tokens=*" %%I in (`cm status --private --ignored --short .`) do ( del /A /Q "%%I" rmdir /S /Q "%%I" rmdir /S /Q "%%I" ) It's certainly ridiculous, especially the fact that rmdir is required twice in a row, but it's closest I was able to get to removing the files and directories in Windows. And even still, some files could not be deleted with these commands. The script could be simpler if it were a PowerShell script, however that would require some setup in order to run as conveniently as a cmd file. It's slower than it needs to be because if a folder is ignored/private, then this command will waste time deleting each item contained in the folder individually. I think that this is a pretty compelling use case to add a native cm clean command, so I hope Codice reconsiders their response to the former feature request mentioned above.
×
×
  • Create New...