title: Google Cloud Storage - Move file from one folder to another - By using Python
body: <p>I would like to move a list of file from google storage to another folder:</p>
  
  <pre><code>storage_client = storage.Client()
  count = 0
  
  # Retrieve all blobs with a prefix matching the file.
  bucket=storage_client.get_bucket(BUCKET_NAME)
  # List blobs iterate in folder 
  blobs=bucket.list_blobs(prefix=GS_FILES_PATH, delimiter='/') # Excluding folder inside bucket
  for blob in blobs:
  if fnmatch.fnmatch(blob.name, FILE_PREF):
           WHAT CAN GO HERE?
           count += 1   
  </code></pre>
  
  <p>The only useful information which I found in Google Documentation is:</p>
  
  <ul>
  <li><a href="https://cloud.google.com/storage/docs/renaming-copying-moving-objects" rel="nofollow noreferrer">https://cloud.google.com/storage/docs/renaming-copying-moving-objects</a></li>
  </ul>
  
  <p>By this documentation, the only method is to copy from one folder to another and delete it.</p>
  
  <ol>
  <li>Any way to actually MOVE files?</li>
  <li>What is the best way to move all the files based on PREFIX like <code>*BLABLA*.csv</code></li>
  </ol>
  
  <p>P.S. Do not want to use </p>
  
  <ul>
  <li><code>"gsutil mv gs://[SOURCE_BUCKET_NAME]/[SOURCE_OBJECT_NAME]
  gs://[DESTINATION_BUCKET_NAME]/[DESTINATION_OBJECT_NAME]"</code></li>
  </ul>