Monday 9 September 2019

wildcard - Using wild cards in GRASS to remove files


I have a bunch of files on a GRASS location, all named temp_something, that I want to delete. I tried to use the g.remove tool using the multiple option and typing temp* in, but it doesn't work out, and a character * not allowed error is reported.


Am I doing something wrong or is there just no way GRASS works with wildcards?




Answer



I had success by using g.remove -f type=vector pattern="temp*"


It turns out, when intending to remove multiple files based on their names and making use of wildcards, one uses the pattern parameter and not the name.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...