Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Move file to folder #247

Answered by Dario-Ciceri
Dario-Ciceri asked this question in Q&A
Discussion options

Hi, is there a way to move an existing spreadsheet to a folder?
I tried with:

current_file['parents'][0]['id'] = folders[current_file_title_to_datetime.month-1]['id']
current_file.Upload()

it doesn't give errors but the current_file['parents'][0]['id'] didn't changed.

Thanks

You must be logged in to vote

oh nevermind, like this it works:

current_file['parents'] = [{"id":folders[current_file_title_to_datetime.month-1]['id']}]
current_file.Upload()

I know there's a filesystem which it would be easier to use but it doesn't seems to work, it always gives me AssertionError when trying to mv, move, cp or copy files...

Replies: 1 comment

Comment options

oh nevermind, like this it works:

current_file['parents'] = [{"id":folders[current_file_title_to_datetime.month-1]['id']}]
current_file.Upload()

I know there's a filesystem which it would be easier to use but it doesn't seems to work, it always gives me AssertionError when trying to mv, move, cp or copy files...

You must be logged in to vote
0 replies
Answer selected by shcheklein
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
question Further information is requested
1 participant
Converted from issue

This discussion was converted from issue #245 on November 17, 2022 19:00.

AltStyle によって変換されたページ (->オリジナル) /