I have a few files I want to delete, they have the same name at the start but have different version numbers. Does anyone know how to delete files using the start of their name?
Eg.
version_1.1
version_1.2
Is there a way of delting any file that starts with the name version?
Thanks
Substitute the correct path (or
.(= current directory)) formypath. And make sure you don’t get the path wrong 🙂This will raise an Exception if a file is currently in use.