Skip to content

Move file to folder #245

Closed
Closed

Description

@Dario-Ciceri

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

Activity

  1. Dario-Ciceri commented on Nov 17, 2022

    @Dario-Ciceri
    Author

    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...

  2. locked and limited conversation to collaborators on Nov 17, 2022
  3. converted this issue into a discussion #247 on Nov 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions