When I try to delete a specific folder in the GCS bucket, "Sample", it deletes all the folder names starting with "Sample" (e.g. like "Sample","Sample1","Sample2").
The answer available here does not filter enough for my purposes
Can someone suggest how to fix this?
from google.cloud import storage
storage_client = storage.Client()
bucket = storage_client.get_bucket('bucket name')
blobs = bucket.list_blobs(prefix='Sample')
for blob in blobs:
blob.delete()