GithubHelp home page GithubHelp logo

Comments (3)

shcheklein avatar shcheklein commented on June 30, 2024

Yes, PyDrive2 API is quite "specific". Sorry, about that it's a legacy that we are replacing gradually with fsspec compatible implementation here.

I would give it a try, I think this spec should be enough to try along with the link above.

For the native PyDrive2 api, to make it work you need to create instance of the file object to manipulate with it.

file_id = "id" # you need to know this ID, can be taken in UI, or using other PyDrive2 helpers, something like this:
file_to_copy = drive.CreateFile({"id": file_id})
directory_to_copy_to = drive.CreateFile({"id": directory_id}) # optional
file_to_copy.Copy(target_folder=directory_to_copy_to, new_title="if you need this")

from pydrive2.

shcheklein avatar shcheklein commented on June 30, 2024

May be tests in https://github.com/iterative/PyDrive2/pull/188/files , could also help you get a better idea on how this API works.

from pydrive2.

meet1919 avatar meet1919 commented on June 30, 2024

I see, I can use this cp(["source/file1", "source/file2", "source/subdir/subfile1"], "target/") for copying multiple files to target folder. Just wondering (might be a little silly), what will be the file path here in reference to the drive?

Should it be like cp(["file1_id", "file2_id"], "target_folder_id") ?

from pydrive2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.