Python file search tool doesn't work with google drive

I wrote a little Python tool that allows me to search the contents of every file under a given root folder, looking for a text string. I just moved all my files from my C: (local) drive to my G: (google) drive, as part of company policy. I found that it doesn't work on the G: drive. Can anyone advice me the simplest way to fix? Here's the code I am using (which I am sure is terrible in other ways too!)

from sys import argv,exit
import os
verbose = True
try:
   TEXT,EXT,FOLDER = argv[1],argv[2],argv[3]
except:
   print("-----------------------------------------------------------------------")
   print("Error: parameters missing")
   print("Correct usage: findFiles <text> <extension> <folder> [-v]")
   print("e.g. findFiles Ford .txt C:\\Users\\Jane Doe")
   print("-----------------------------------------------------------------------")
   print("<text> = text to look for, e.g. Ford")
   print("<extension> =  types of file to look in, e.g. .txt (.* means all files)")
   print("<folder> = FOLDER to start search in")
   print("-v is optional. If present runs in verbose mode.")
   print("-----------------------------------------------------------------------")
   exit(0)
if len(argv) >=5:
   if argv[4] == '-v':
       verbose = True
if verbose:
   print("Looking for {} in all files with extension {} in folder {}".format(argv[1],EXT,FOLDER))
numFiles = 0;numRFiles = 0; numMatches =0;matchedFiles = []
for dirname, dirs, files in os.walk(FOLDER):
   for filename in files:
       filenameWithoutExtension, extension = os.path.splitext(filename)
       if EXT == '.*' or extension == EXT:
           try:
               fname = os.path.join(dirname, filename)
               numFiles += 1
               contents = open(fname, 'rb').read()
               numRFiles += 1
               print(fname)
               if TEXT in contents:
                   if verbose: print('MATCH\t'+fname)
                   numMatches += 1
                   matchedFiles.append(str(numMatches)+'\t'+fname)
               else:
                   if verbose: print('NO MATCH\t'+fname)
           except:
               if verbose: print('UNREADABLE\t'+fname)
               continue
print('\n')
print("Searched through {} files, {} readable, found {} matches".format(numFiles,numRFiles,numMatches))
for m in matchedFiles:
   print(m)