-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pull folders only #670
Comments
Roger that. We could have a flag to just pull directories kind of the way you can specify only files with |
push and pull now allow for selection of types e.g only files, only directories using flags `--files` or `--directories`. * Pull: - Exhibit A: No type sifting/selection -- ordinary pull ```shell drive pull a1 Resolving... - /test/a1 - /test/a1/b2 - /test/a1/b2/c3 - /test/a1/b2/c3/d4 - /test/a1/b2/c3/d4/e5 - /test/a1/b2/c3/test.txt Deletion count 6 Proceed with the changes? [Y/n]: ``` - Exhibit B: only files ```shell $ drive pull --files a1 Resolving... - /test/a1/b2/c3/test.txt Deletion count 1 Proceed with the changes? [Y/n]: ``` - Exhibit C: only directories ```shell $ drive pull --directories a1 Resolving... - /test/a1 - /test/a1/b2 - /test/a1/b2/c3 - /test/a1/b2/c3/d4 - /test/a1/b2/c3/d4/e5 Deletion count 5 Proceed with the changes? [Y/n]: ``` - Exhibit D: illogical state, both files and directories ```shell $ drive pull --directories --files a1 cannot request for both file and folder ``` * Push: - Exhibit A: No type sifting/selection -- ordinary request ```shell $ mkdir -p a1/b2/c3/d4/e5 && touch a1/b2/c3/test.txt $ drive push a1 Resolving... + /test/a1 + /test/a1/b2 + /test/a1/b2/c3 + /test/a1/b2/c3/d4 + /test/a1/b2/c3/d4/e5 + /test/a1/b2/c3/test.txt Addition count 6 Proceed with the changes? [Y/n]: ``` - Exhibit B: only files ```shell $ drive push --files a1 Resolving... + /test/a1/b2/c3/test.txt Addition count 1 Proceed with the changes? [Y/n]: ``` - Exhibit C: only directories ```shell $ drive push --directories a1 Resolving... + /test/a1 + /test/a1/b2 + /test/a1/b2/c3 + /test/a1/b2/c3/d4 + /test/a1/b2/c3/d4/e5 Addition count 5 Proceed with the changes? [Y/n]: ``` - Exhibit D: illogical state ```shell $ drive push --directories --files a1 cannot request for both file and folder ``` Fixes #670.
Hello there @brandoncurtis, thank you for this request. $ drive push --directories a1/m1
$ drive pull --files tf1/tf2 Please see PR #673. If there are any issues, feel free to reopen this issue. |
Brilliant. Works great! Thanks @odeke-em! |
Thanks for checking it out @brandoncurtis and for the kind words :). Good morning! |
I have a Google Drive with a huge, deeply-nested file structure. It is not feasible to store the contents of the Drive locally, and the folder structure is too complicated to keep in my head.
I would like to use
drive pull
to recreate the entire folder structure locally; then I could navigate the structure in the terminal and pull down individual folders when I need them. Is this possible with the current version ofdrive
?The text was updated successfully, but these errors were encountered: