Как я могу автоматически сохранять свои файлы в OneDrive или Google Drive без сохранения на моем компьютере?

866
user3545446

Я веб-разработчик, и у меня установлена ​​Windows 10 на очень маленьком SSD (128 ГБ).

Проблема в том, что когда я хочу сохранить свой файл в облачной службе, мне нужно сохранить файлы на моем компьютере, чтобы клиент OneDrive или Google Drive мог их синхронизировать.

У меня очень мало свободного места, поэтому я не могу себе этого позволить.

Можно ли сохранять файлы в облаке (напрямую) без необходимости сначала загружать их на мой компьютер?

3
Я угадаю, мой вопрос немного перебор: D user3545446 7 лет назад 0

1 ответ на вопрос

5
InterLinked

This method will allow you to accomplish what you require without installing additional software.

You can upload files to OneDrive without even having the OneDrive application installed or enabled. I use many computers on a daily basis that aren't mine and this is exactly what I can do. This is also a workaround for the "placeholders" issue people have complained about with the OneDrive client.

Furthermore, you can automate this process

  1. Login into www.onedrive.com
  2. You should see the link comes back as https://onedrive.live.com/?id=root&cid=XXXXXXXX. Note all of the Xs which is your unique CID
  3. For demonstration purposes, open Notepad and paste this code in (all one line):

    net use n: "https://d.docs.live.net/XXXX/YY/ZZZ" /USER:microsoftaccountusername@outlook.com /P:No

  4. Save the file as map.bat (batch file, not text file). Adjust XXXX to your CID, and adjust the file path accordingly to the folder you need. Change microsoftaccountusername@outlook.com to your actual email address, and you can change drive N: to any letter you choose that is not currently being used.

  5. Run the batch file

  6. In "This PC" you will see the OneDrive folder you chose mapped as a network drive. The space free does not reflect your OneDrive storage, rather it reflects your computer's hard drive's storage (they're exactly the same). You can disregard this.

  7. You don't need to map OneDrive as a network drive. You can utilize UNC, instead of accessing it like \\server\share you will just need to use the path in your batch file. Instead of using http://, use \\d.docs.live.net@SSL\CID\etc... - and you will be prompted for credentials.

  8. You can either use the command-line switch /P:Yes instead of /P:No in my example, or click Remember Credentials if you use the GUI.

Please keep in mind that since the files are not locally on your system, you are essentially mapping OneDrive as a drive when the resources are all on remote Microsoft servers. So it will be slower than if you had them synced locally, albeit not much.

This method above works only for OneDrive. Google Drive does not support any of this technology. Dropbox does not support it natively, but there is a paid service called DropDav you can look into. Alternatively, a service called Otixo will allow you to map Google Drive as a drive but in order to do so, you need WebDav which is a paid feature. OneDrive provides this for free.

Automation: You can and you should automate all of this if possible. I don't know how you interact with OneDrive, but since this can all be done with a batch file, you can leverage automation in order to make this easy and as effortless as possible.

Похожие вопросы