title: Why Python Azure function app not copying single file from directory to directory in Storage account?
body: <p>I have a Azure function app developed in Python which checks if any blobs available at a specific folder. <br/>If blobs exists, loop through all blobs and copy them into another directory in the same storage account.<br/>I have a code which is checking for file existence but loop is failing when only one single file is there in the container. Not sure why.</p>
  <pre><code>blob_service_client = BlobServiceClient.from_connection_string(os.getenv('AzureWebJobsStorage'))
  container_ref = blob_service_client.get_container_client('container')
  blobs = container_ref.list_blobs(name_starts_with='incoming/srcerx/')
  blob_list = []
  for s in blobs: #blobs have value of a blob, so loop starts
      blob_list.append(s)
      #use break to make sure only one iteration to avoid iterating all the blobs
      break
  if len(blob_list) &gt; 0: #length is 1 coming here
      fileCount = 0
      #move all blobs to dated directory in the same container
      for s in blobs: #not entering loop if only one blob is there
          print(s.name.replace('incoming/srcerx/',''))
          fileCount+=1
          moveBlobs(s.name)
  </code></pre>
  <p>I am not sure what wrong I am doing here. I tested this code with 1000 files, it copied all 999 files but left one.<br/> It would be better if somebody suggest any better idea to load all blobs without loop in Python.</p>