I have this little script made with help from @metamorporpoise which moves all of my CSVs from my folder on Mac to my Google Drive main directory. I am new to google API and even python so could someone give me a hint about what needs to be done to upload all of those CSV files to specified folder in Google Drive, and not to the main directory as this script does?
import gspread
import os
gc = gspread.oauth(credentials_filename='/users/krzysztofpaszta/credentials.json')
os.chdir('/users/krzysztofpaszta/CSVtoGD')
files = os.listdir()
for filename in files:
if filename.split(".")[1] == "csv":
sh = gc.create(filename.split(".")[0]+' TTF')
content = open(filename, 'r').read().encode('utf-8')
gc.import_csv(sh.id, content)
Thank you for the help