Console client for Linux. Guide for connecting Yandex disk in Linux Bat file access to Yandex disk

They are a convenient service for storing photos and other files. But over time, it becomes necessary to refuse services. virtual storage... Many users don't know how to do this. This article will tell you how to properly remove Yandex Disk from your computer.

How to remove Yandex Disk - service shutdown

The virtual cloud is connected to the computer, so the first step is to disable the service.

  • When, then its icon is located in the lower right corner. Click on it. The service window will open. At the bottom, select the gear-like icon. It will allow you to enter the cloud menu.
  • In the menu that opens, select the "Settings" section.
  • You will see the Yandex.Disk Settings menu. On the top panel select the "Account" tab. In the center of it there is a button "Disconnect the disk from the computer". When you press it, you will break the connection between the cloud and the computer. Then select "OK" and proceed to delete the virtual storage.


How to remove Yandex Disk through the control panel

The first thing to do after disconnecting the service from the computer is to remove the application.


How to delete a folder with Yandex Disk files

After removing the cloud application, a folder with files remained on the computer. To save space on your computer, you need to clear it.

Advice. Review the files again before deleting them. If there are some that you still need, then copy them to your computer.

  • Open Explorer and find a folder named "Yandex.Disk". It is usually located in the root directory. Or open the "My Computer" window, where select it.


  • Right click on the cloud folder. In the context menu that appears, select the "Delete" item.
  • After this action, the folder with all the files will be deleted from your computer. To completely destroy all information about the location of the virtual disk on the device, you need to clean up the registers. Use services RegCleanr, CCleaner or similar. They clean the computer from the "remnants" of the work of remote programs.


How to remove Yandex Disk from a computer through a browser

If you've installed the cloud extension for your browser, then don't forget to remove it here as well.

  • The process for removing extensions is similar in most browsers. This example involves uninstalling applications through Google Chrome. Open it and enter the change menu, which is located on the right, at the top of the screen.


  • In the context menu, select the "Settings" item.


  • The settings menu will open, where click "Extensions". This tab will open a list of all installed browser extensions.


  • In the list of applications that appears, find "Yandex.Disk".


  • To remove an extension, click on the trash can icon.


  • Confirm the deletion by clicking on the "Delete" button.


  • The program will redirect you to the virtual cloud site, where you must indicate the reason for deleting the service. This is an optional step, but it will help developers make changes to improve the performance of the program.


How to remove Yandex Disk - cleaning the Internet service

All that's left to do is remove the files from the internet. After all, first of all, all information is stored here.

  • Log in to your Yandex Drive account or go to the service mail. To do this, enter, then click "Login".


Important! All Yandex services are linked using your mail. Be careful when trying to clean up cloud file storage. If you delete mail, then all other services are destroyed.

  • To clear Yandex Disk of information, you need to go to it. Select the folders to be shredded and drag them to the trash can. Or click on its icon with right side screen.


  • Then open the Trash tab and empty it. This will remove all files from the Internet service.


If you still do not understand how to do this, then for an illustrative example, watch the video:

The global network is replete with interests. And if some users install Yandex. Disk ", and actively fill it with all kinds of videos, pictures and software, while others, at the same time, terrorize search engines by asking how to delete Yandex disk. It is worth noting that this procedure does not require any special skill, and its actual implementation is not a secret behind seven seals.

The instructions below will help you remove the cloud service application from your computer, as well as the files located in its storage - the Yandex.Disk folder - on the PC hard drive and web server.

1. Before uninstalling the program for storing files, you must disconnect its Internet connection with the Yandex server.

Click on the application icon (the image of a flying saucer) with the right mouse button. It is located in the tray (bottom right on the taskbar). And then in the context menu, left-click, click the "Settings" option.

The Yandex.Disk Settings panel will appear on the display. On the "Account" tab, click the "Disconnect computer from Disk" button, and then "OK" to confirm the operation.


2. Now you can remove Yandex disk application:

  • Open the application menu again (right-click on the icon) and click "Exit";
  • through the "Start" go to the "Control Panel" and select in the settings of the parameters "Uninstall the program";
  • in the list of installed software in the "Name" column, find "Yandex.Disk" and select it with the left mouse button. Then activate the "Delete" function located at the top of the program list.



Select the "YandexDisk" folder with the left button and click the "Delete" command in the context menu.

If all operations are performed correctly, Yandex Disk is no longer on your PC!

In order to destroy the contents of the file storage on the web server, you just need to use the service interface on your personal page. Sometimes novice users try to completely delete their Yandex account to solve this problem. This should not be done, since not only files will disappear, but also all attached system services (mail, geographic Maps, payment system).


Spot intervention is needed here! Log into your Yandex Disk account (disk.yandex.ru). Drag all unnecessary files to the trash: move the cursor over the object and, holding the left button, move it. When the "cleaning" is finished, in right panel of the "Basket" interface, click on the "Clear" button.

That's all! After global delete, if necessary, you can enter the storage facility at any time and use its services again.

We wish you success in mastering Internet services, dear reader!

But later they decided to abandon it, and, of course, you need to remove it. The reasons can be any: maybe you wanted to work with other cloud storage, or maybe your friends have recommended something more interesting to you. In general, it doesn't matter why, but you have decided to remove this software. And how exactly to do this, I will now explain to you, more precisely, I will write detailed step-by-step instructions.

How to remove Yandex.Disk cloud from your computer

Yandex.Disk application is normal software application(read about its download) and can be removed from the computer using standard Windows tools. But the files in the synchronization folder will still remain, they need to be deleted manually. What should be done:

The files you uploaded will remain on your account (read about uploading files to the storage). They are removed in the usual way. Complete removal of Yandex.Disk is possible by closing your account on the service website.

Important! On the web, it is often recommended to simply turn off cloud sync with your computer. As a result, the connection between the computer and the account will be broken, but the actual deletion software from the computer will not happen.

Note: you can watch how to remove Yandex.Disk from your computer in the video below.

How to remove Yandex.Disk from your phone

Here's what you need to do:

Important! When only point 2 is performed, only the shortcut will actually be deleted, and the program will remain in the phone's memory.

In this article, we have discussed how you can remove the Yandex.Disk application from your computer or Android gadget. As you can see, this is not at all difficult and does not require any effort from you (even a person who is using a computer for the first time can do this). Plus, now you have a clear step-by-step guide that you can use. Hope it helps you. On this I say goodbye to everyone, everyone have a nice day!

A huge number of users want to install Yandex.Disk on their devices. But not less than those who wish to get rid of it. This is due to the fact that some users prefer cloud storage, while others want to get rid of them.


The removal process is pretty straightforward. Users are not required to have any knowledge or skills. It is enough to follow the instructions completely. Simple rules will help you extract the cloud storage, as well as the files located in it. Let's get down to action.

Extract Yandex.Disk

The first step is to turn off the Internet connection. After that, you need to move the mouse cursor over the icon with the program and click on it. You can find it on the taskbar. After that, go to the context menu and find an item with the name "Settings". Click on it with the left mouse button.

In the panel with Yandex.Disk settings that will open, users will be able to see the "Account" section. Here you need to disconnect your computer from this cloud storage... At the end of the process, click "OK" so that all previously performed manipulations take effect.

After that, we proceed directly to extracting the program.
You need to right-click on the software icon again.
Then a new window will open. In it we find the item "Exit". Select it. Next, go to the "Start" menu. Here you can see many different positions, among which we select "Control Panel". In the settings that appear, click on the item "Uninstall the program".

Next, a large list of installed programs will open, among which there will certainly be Yandex.Disk. Select the file name and click "Delete". The extraction function is located at the very top of a large list of utilities.

Users can use not only standard operating system tools. You can also choose special programs as assistants. You can find a huge number of such utilities on the Internet. They are able to quickly cope with the task.

So just download the Uninstall Tool or any other utility with such capabilities to your computer. These types of services are able to disable all blocking processes that can prevent the extraction of cloud storage. With the help of professional applications, you can permanently clear your device's hard drive from Yandex.Disk.

So now all that remains is to get rid of the folder with this software. We delete it too. But before that, it is advisable to open the folder again to make sure that there are no important documents in it. If nothing of value is found, then feel free to delete the remaining folder.

To install the client automatically, use the command quick installation package.

An example of a quick installation of a .deb package

echo \ "deb http: //repo..list.d/yandex-disk.list> / dev / null && wget http: //repo..GPG -O- | sudo apt-key add - && sudo apt-get update && sudo apt-get install -y yandex-disk

To install the client manually, download the required version of the package from the corresponding link below.

Example installation using the dpkg package manager

# dpkg -i yandex-disk_0.1.0.103_i386.deb

Note. The repository is automatically installed at

Example installation using rpm package manager

# rpm -ivh yandex-disk-0.1.0.103-1.fedora.i386.rpm

Note. The repository is automatically installed at /etc/yum.repos.d/yandex.repo

You can also add the yandex-disk package repository to the list of available package manager repositories and install the package using the apt-get or yum utility.

Installing with apt-get

Attention. Save a copy of the file /etc/apt/sources.list.d/yandex-disk.list before making changes to it.

# wget -O YANDEX-DISK-KEY.GPG http: //repo..GPG \ n # apt-key add YANDEX-DISK-KEY.GPG \ n # echo \ "deb http: //repo..list.d /yandex-disk.list\n# apt-get update \ n # apt-get install yandex-disk

Installing with yum

# nano /etc/yum.repos.d/yandex.repo\n# rpm --import http: //repo..GPG \ n # yum install yandex-disk

Content of the yandex.repo file:

\ nname = Yandex \ nfailovermethod = priority \ nbaseurl = http: //repo...GPG

Initial Configuration Wizard

You can perform initial client configuration using the setup command.

$ yandex-disk setup

    Enter the name of the directory for storing the local copy of Drive. If you leave the name empty, a Yandex.Disk folder will be created in the home directory.

    Indicate whether to use a proxy server (y / n).

    Specify whether to start the client at system startup (y / n).

    Enter your Yandex username.

    Enter your Yandex password.

    Attention. If you are using or have used two-factor authentication before, you need a one-time password generated by Yandex.Disk to log in to Yandex.Disk. mobile application Yandex.Key.

After the wizard completes, a config.cfg configuration file will be created in the ~ / .config / yandex-disk directory.

Work with the client

Commands

The following commands are used to work with the client:

    token - get an authorization key (OAuth token) for your Yandex login (USERNAME). When entering the command, you can specify your Yandex password (PASSWORD) and specify the file name for storing the token and the path to it (FILE). If Extra options will not be specified, a passwd file will be created in the ~ / .config / yandex-disk directory to store the token. $ yandex-disk token [-p, --password = PASSWORD] USERNAME

    start - start the daemon and synchronize all folders, except for those specified in the exclude-dirs list. $ yandex-disk start

    status - display the status of the daemon (sync status, sync errors, list of synced files, total and free disk space). $ yandex-disk status

    stop - stop the daemon. $ yandex-disk stop

    sync - sync all folders except those specified in the exclude-dirs list. $ yandex-disk sync

    publish - get a public link to the specified file or folder (FILE). $ yandex-disk publish FILE

    unpublish - Unpublish for the specified file or folder (FILE). $ yandex-disk unpublish FILE

Extra options

--config = FILE, -c FILE

Specify a configuration file. By default, the config.cfg file in the ~ / .config / yandex-disk directory is used.

Dir = DIR, -d DIR

Specify a directory for storing a local copy of the Disk. If its name was not specified during the initial configuration, the ~ / Yandex.Disk directory will be used by default.

Auth = FILE, -a FILE

Specify a file with authorization data. By default, the passwd file is used, which is created using the token command or the Getting Started Wizard and is stored in the ~ / .config / yandex-disk directory.

Exclude-dirs = DIR1, DIR2, ...

Do not sync the specified directories. For this setting to always take effect, the directories must be added to the exclude-dirs list in the config.cfg file. For the setting to work correctly, the names of the excluded directories must be listed separated by commas, without spaces.

Read-only

Prevent changing files on the Drive server and synchronize only the local copy. Local files will be renamed if there are synchronization conflicts. If --overwrite is additionally specified, local files will be overwritten.

Overwrite

When synchronizing with the server, allow overwriting of changes made in the local copy of Disk. Used in conjunction with the --read-only option.

No-daemon, -D

Start the daemon without returning control to the console. To regain control, the daemon must be stopped by running the yandex-disk stop command in another console or by closing the current console.

Help, -h

Display help.

Proxy = PARAM

Configure a proxy server. Valid parameters:

    auto - use system settings proxy server (used by default);

    no - do not use a proxy server;

    protocol, address, port, login, password- configure manually.

Examples of using commands

$ yandex-disk start -c ~ / ydconfig / newconfig.cfg # start daemon and sync with the specified file config \ n $ yandex-disk start --exclude-dirs = Foto # do not sync folder Foto \ n $ yandex-disk sync --read-only # sync folders in read-only mode \ n $ yandex-disk publish Foto # get public link to the Foto folder

Example config.cfg file

# Path to the file with authorization data \ nauth = \ "/ home / user / ydconfig / my_passwd \" \ n \ n # Directory for storing a local copy of the Disk. \ Ndir = \ "/ home / user / myDisk \" \ n \ n # Do not sync the specified directories. \ n # exclude-dirs = \ "exclude / dir1, exclude / dir2, path / to / another / exclude / dir \" \ n \ n # Specify a proxy server. Examples: \ n # proxy = https, 127.0.0.1,80 \ n # proxy = https, 127.0.0.1,80, login, password \ n # proxy = https, 127.0.0.1,443 \ n # proxy = socks4, my .proxy.local, 1080, login, password \ n # proxy = socks5, my.another.proxy.local, 1081 \ n # proxy = auto \ n # proxy = no

Questions and answers

What Drive features are available in the console client?

When working with the console client, you have access to all of the main Drive features: synchronization and publication of files and folders, selective folder synchronization.

Does Selective Folder Sync work in the console client?

Yes. You can prevent individual folders from being synchronized by specifying them when entering the command (parameter --exclude-dirs = DIR1, DIR2, ...) or by adding exclude-dirs to the list of exclude-dirs in the config.cfg file.

Does the console client support symlinks?

Yes, it does.

Can I use the console client to replicate data?

Yes. Data replication can be done using the --read-only option.

GUI for Linux console client

You can work with the console client using a third party GUI.

Name Description
YD-tools The utility supports all the main functions of the console client. It displays the current sync status as an icon in the taskbar and can communicate changes via pop-up notifications. It also adds items responsible for publishing to the context menu.

It is assumed that the backups are already stored in a specific folder. In the example below, this is the folder backup located at the root of the server.

After installing and configuring Yandex Disk.

Create a directory on the server through the command line my_scripts and the script file backup_webdav.sh, which will move backups to Yandex Disk:

cd /
sudo mkdir my_scripts
nano /my_scripts/backup_webdav.sh

Insert the contents of the script:

# Mount Yandex Disk
#mv / backup / / mnt / yandex
cp -r / backup / * / mnt / yandex
# Disable Yandex Disk
umount / mnt / yandex

where the -r - means copying including folders.

If you wish, you can move the entire folder, for this we uncomment the move command, and comment out the copy command.

# Mount Yandex Disk
mount -t davfs https://webdav.yandex.ru / mnt / yandex /
mv / backup / / mnt / yandex
#cp -r / backup / * / mnt / yandex
# Disable Yandex Disk
umount / mnt / yandex

From folder / backup / the data will be copied to the Yandex Disk folder, which is connected along the path / mnt / yandex.

Running the script manually:

sh /my_scripts/backup_webdav.sh

or if it doesn't work like this:

cd / my_scripts
sh backup_webdav.sh

You can add a script to CRON jobs and assign a schedule.

Adding tasks to CRON

Opening the CRON file

nano / etc / crontab

Add data:

# Backup to Yandex Disk
# daily at 2:00
00 2 * * * root /my_scripts/backup_webdav.sh> / dev / null 2> & 1

On the backup_webdav.sh file, you need to set access rights chmod + x otherwise it won't run via CRON. To do this, enter through the command line:

cd / my_scripts /
chmod + x backup_webdav.sh

Now every day at 2 am, backups created third party programs, will be moved to Yandex Disk.

Making a backup copy for scripts

It is also possible for the future by making a backup for them in the root directory of the site.

You don't have to make a script at all in the server root folder, but immediately make it in the site root and hook it up via CRON. Then the script can be created via an FTP client, and the console is needed only for editing the cron file. But in this case, scheduled backup may not work, some settings for CRON will not be enough.

Yandex Disk app offers 10 GB of free space after installation. Subsequent gigabytes are purchased separately. According to the tariffs for 10 GB, the developer asks for 30 rubles, 100 GB - 80 rubles, 1 TB - 200 rubles. Prices are based on rent for 30 days.

An application installed for Windows, Mac OS X, or mobile platforms will require a constant internet connection to sync files. When the network is disconnected, new data will be downloaded automatically after connecting. It is difficult to feel the effect of the disk operation. On Android and IOS automatic synchronization is user configurable. The option of working only when available will save expensive mobile traffic.

Yandex storage manages information on the server by modifying files in the program folder on the user's computer. Unfortunately, this option may not suit you due to the reluctance or impossibility of storing files on the HDD (), arising due to lack of space or the use of an incompatible OS.

Connecting and configuring WebDAV on Windows

If you want to use Yandex storage on Windows OS, you do not need to connect a network drive. The sequence of actions in this case is as follows:

    1. Right-click on the computer shortcut, on the desktop or in the "Start" menu.
    2. In the list that opens, select the "Map network drive" item.

    1. In the window that appears, set the drive letter and the address of the Yandex NAS server https://webdav.yandex.ru/.

    1. Press the "Finish" button and wait for the connection network drive.
    2. After a short wait, the Windows security window will automatically open, in which you will need to enter your data in the appropriate fields. account with linked storage Yandex.

Access to the menu for connecting a network drive is also present in Explorer - an item in the tab of the upper horizontal menu "computer". Correctly following the sequence of actions, a new network drive with files will appear. Unlinking the Yandex directory is performed through the "Disconnect network drive" menu.

Connecting a file service via the Windows command line

If the option of installing a network drive using Windows Explorer does not suit you or does not work correctly, there is a second solution to the problem using command line(CMD). First you need to run it. There are two options for how to do this:

    1. Dial search query"Cmd" in the Start menu (if Windows Vista is installed, see 7), after which windows will show the icon of the application, which must be launched.
    2. For Windows 8, 8.1 and 10, run the "Run" application, which is provided in all versions of the OS from Microsoft, using the "Win + R" key combination and write the "cmd" command in the window that opens.

At the stage when the command line is already running, you will need to perform several actions one by one:

    1. Dial the command " Net Use", Sequentially writing the letter of the volume, the address to the Yandex network folder and the parameter for restoring the storage after reboot (if recovery is needed - yes, otherwise - no). A ready-to-work team looks like this - “ net use j: https://webdav.yandex.ru / persistent: yes».

    1. Confirm the entry of the command with the Enter key.
    2. After that, the console prompts you to enter a username, which you need to do.
    3. Finally, enter the password, remembering to confirm the entry.

Now the network drive will be displayed in the explorer. If access was denied, the password and username must be verified.

Particular attention should be paid to step # 4, since the introduction of secret characters in cmd is not displayed even in the form of asterisks.

Network drive WebDAV on Linux to access Yandex drive

In order to map a network drive on Linux, you need to perform four steps:

  1. Open the Nautilius file manager ( standard tool for Linux OS).
  2. Left-click on the "Connect" menu, after which a window with connection settings will open.
  3. In the server field, enter the address https://webdav.yandex.ru, set the port to 443, select the type “ Secure WebDAV", Leave the folder item unchanged, fill in the username and password with Yandex registration data.
  4. After clicking on the connect button, a network drive with files will appear in Nautilius.

Connecting a console client on Linux

The second method for Linux offers an increased speed of access to online storage and reduces the load on the hardware compared to WebDAV.

One drawback - the package is installed without graphical interface... Commands for setting up and working with files are executed through the terminal.


Setting comes down to three steps:
  1. Download the official console client package and install or execute the process via the console command detailed on official page downloads.
  2. Confirm the installation with the Enter key.
  3. Log in with the console command username with the login and password in the terminal.

A detailed list of commands for working with the client in Linux is presented on the application download page. This method is suitable for users who confidently manage the terminal.

Yandex disk API

API (Application Programming Interface) is a wrapper used for programming applications. With the help of this Yandex software, third-party developers build online storage functionality into own programs... The kit is distributed free of charge on the official website with the tech subdomain.
In addition to compatibility with Windows applications, Mac OS X, mobile Windows platforms Phone, IOS and Android.

For web programmers, Yandex presented packages that, using widgets, easily integrate the storage into the work of the site.

The API is implemented on the open WebDAV protocol, which is based on HTTP (Hypertext Transfer Protocol). The program allows you to instantly upload a file to the server, if such is already synchronized by the user of the service. The functionality works according to the reconciliation principle checksums... When they match, an instant download occurs. The function is called Deduplication.

The programmers of the disk, in addition to the API for the convenience of developers, have released a full-fledged Yandex SDK, available in Java, as well as object-oriented programming languages ​​C Sharp and Objective-C.

Download master and Yandex disk

Such a simple process as downloading a file external bootloader does not raise questions. But in practice, there is a problem with Yandex storage. Studying the download page on Yandex disk, you can face a dilemma - there is no link for copying, which Download Master needs. In order to get it you need:

    1. Start downloading in the browser (see).
    2. Go to the download tab.
    3. Pause to save traffic or immediately right-click on the loaded object.
    4. Select the item "copy link address".

  1. Add new download to Download Master using copied link.

Capture links Download master

There is another solution to the problem, if the option described above does not suit you. Download Master in this case is configured to intercept downloads. For this you will need:

  1. Run the program.
  2. Go to the "Settings" item in the horizontal menu.
  3. By pressing the plus button, open the topic "General" and select the sub-item "Integration".
  4. Check the boxes: "Track URL in the clipboard", "Microsoft integration Internet Explorer"," Extended Integration ".
  5. Restart your browser.

Interception is only supported in Internet Explorer. To work correctly, you need version 6+.

Downloading private files

If the file has no settings general access, then the link to it is available only to the owner. To find the URL for a personal document:

    1. You need to log into your Yandex disk account through a browser.
    2. Select the file with the left mouse button, after which a thumbnail and description will appear in the right column.
    3. Click on the download icon to the right of the yellow Edit button.

Configure download manager:

    • on the "Tools" tab - select "Site Manager";

    • in the window that opens, select "Add";

    • fill in all the fields, "Site" - indicate https://passport.yandex.ru and your username / password for Yandex services.

Flexible connectivity to different systems online storage Yandex will become convenient application for corporations and users who want to get high speed access to files from anywhere in the world, as well as free space, which is enough for personal documentation and photographs.
Another popular application from Yandex, thanks to which the user receives the latest information on flights of aircraft, intercity and suburban trains, ferries and buses

Advantages of webdav access over web access:

  • working with files in automatic mode(downloading / uploading bat files and JS / VBS / PS scripts), that is, first of all, it means the ability to automatically dump backups to the Internet storage
  • connecting the cloud as a network drive (normal network drive) with the assignment of a letter logical drive(E :, F :, etc.), in other words, the ability to work with cloud files from ordinary programs (office suites, graphic editors, etc.)
  • the ability to upload large files (usually the web interface allows you to upload files up to 2 GB to the storage). It should be noted here that free accounts are often limited in file size compared to paid ones, for example, on Box, you can store files no more than 250 MB for free (on Business accounts, the file size can be up to 5 GB, on Enterprise it seems to be up to 15 GB); however, there are other problems with large files, but more on that below

The article will tell you about the possibilities of using WebDAV in various programs, the specifics of connecting manually and from the command line / bat files, common problems and their solutions.

WebDAV in FAR Manager

You can work with file storage via WebDAV without connecting a network drive, if you use the NetBox plugin in Far Manager, while the files will be available in the Far manager but are not available from the command line or other programs such as Windows Explorer.

Mapping a WebDAV network drive

This Windows function allows you to access files via WebDAV not only in file managers(Far Manager, etc.), but also in Command Prompt and Windows Explorer.

Windows 7 has a built-in web client that connects the WebDAV cloud like a regular network drive with a letter assignment. When connecting, you must enter an address that depends on the storage.

WebDAV connection string for Yandex.Disk: https://webdav.yandex.ru
WebDAV connection string for Box: https://dav.box.com/dav
The WebDAV connection string for OneDrive will require a cid - this is the account ID, you can see it in the browser address bar on the OneDrive page: https://d.docs.live.net/ cid
The Mail.ru cloud also offers access via WebDAV, although only at paid tariffs, the WebDAV connection string for Mail.ru: https://webdav.cloud.mail.ru/

Connecting WebDAV from the Windows command line

You can also use the command line capabilities - the NET USE command successfully connects the WebDAV storages, for example, this command connects the Yandex.Disk folder as a logical drive Y:

password/ user: email_address/ persistent: yes

This command to mount the Box folder as a logical drive X:

Net use X: https://dav.box.com/dav password/ user: email_address/ persistent: yes

To connect OneDrive to the letter O: (the cid value is taken from the address bar of the browser in the OneDrive web interface:

Net use O: https://d.docs.live.net/ cid password/ user: email_address/ persistent: yes

To connect OneDrive to an auto-assigned drive letter:

Net use * https://d.docs.live.net/ cid password/ user: email_address/ persistent: yes

Although you can choose to automatically select the drive letter (by specifying an asterisk), I prefer to use fixed letters - this makes it easier to work with batch files.

Note: / persistent: yes is optional, it sets automatic recovery connections when the computer is restarted, see below for details.

After connecting, you can use the standard commands for working with files, for example:

Copy backup.zip y: \ backup

Problems with large files

Operations (download, upload) on small files are fine. However, with larger size file (50 MB or more) there are problems. For example, the message appears Delayed Write Failed (Delayed write error), and the size of the uploaded file turns out to be 0 bytes.

But in reality, it turned out to download a file of 300 MB only the xcopy command with buffering off:

Copying ended successfully, although neither Windows Explorer nor copy / y / z / v.

File size limit

The initial value is 50,000,000 bytes. Set in bytes by a registry parameter:

DWORD FileSizeLimitInBytes

In chapter:

HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Services \ WebClient \ Parameters

For example, you can specify 500,000,000.

Time-out

The initial value is 1800 seconds, or 30 minutes, so operations longer than 30 minutes are interrupted. The timeout value is set in seconds by a registry parameter:

DWORD FsCtlRequestTimeoutInSec

In chapter:

HKEY_LOCAL_MACHINE \ System \ CurrentControlSet \ Services \ MRxDAV \ Parameters

Wevdav storage performance

This is a very interesting question for Reserve copy, because we need to understand how long it will take to copy the file backup to the server via webdav, because the size of such a file can be 100MB, or 1GB or more.

The following test shows the time of uploading a file of 188 MB to Yandex Disk via webdav. Internet connection is 100 Mbps, so it does not significantly affect the upload. The nhts program is used to register the start and end times of copying.

C: \ Users \ username \ Documents> dir * .zip 11.09.2015 15:55 197 858 220 backup-20150911.zip C: \ Users \ username \ Documents> nhts HH: mm: ss "Run" & xcopy backup-2015091 1.zip y: \ backup / Y / Z / V / J & nhts HH: mm: ss "Completed" 15:58:05 Start C: backup-20150911.zip Files copied: 1. 15:58:43 Completed

As a result, the 188 MB file was copied in 38 seconds, that is, the upload speed was 4.9 MB / s or 40 Mb / s - a good result for backups. Accordingly, a 1 GB file will be uploaded to the server in approximately 3.5 minutes.

Now the same test for Box (it's connected to X :):

C: \ Users \ username \ Documents> nhts HH: mm: ss "Run" & xcopy backup-2015091 1.zip x: \ backup / Y / Z / V / J & nhts HH: mm: ss "Completed" 16: 09:57 Start C: backup-20150911.zip Files copied: 1. 16:11:49 Completed

Box works slower - the copy time of the same file was 112 seconds, and, accordingly, the copy speed was 1.7 MB / s or 13.4 Mbps. At this speed, the copying time of a 1GB file will be more than 10 minutes. Box himself writes that for business and enterprise accounts there is some kind of optimization to increase the speed of copying to the server, see How can I optimize my upload speeds?

It is clear that the copying speed can vary depending on the load of communication channels or servers, but it is clear that Yandex Disk is faster, and given the 250 MB file size limit in Box, it is preferable to use free Yandex Drive than a free Box account.

Possible problems and solutions

When a connection problem appears, it is important to determine what kind of error the program is reporting - in order to take the correct action to fix it.

Error 67 - network name not found

Error 67 means that the server could not be found using the network name specified in the command. In english Windows versions this error is described as "The network name cannot be found".

First of all, you need to check if the protocol and webdav server address are correctly typed in the command, for example, for Yandex.Disk it should be:

Https://webdav.yandex.ru

Second, check the resolution of the network name - the server must be available:

C: \ Windows \ System32> ping webdav.yandex.ru Pinging webdav.YANDEX.ru with 32 bytes of data: Reply from 87.250.251.53: bytes = 32 time = 46ms TTL = 51 Reply from 87.250.251.53: bytes = 32 time = 35ms TTL = 51 Reply from 87.250.251.53: bytes = 32 time = 62ms TTL = 51 Reply from 87.250.251.53: bytes = 32 time = 38ms TTL = 51 Ping statistics for 87.250.251.53: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 35ms, Maximum = 62ms, Average = 45ms

If the server is unknown or does not respond, then there is clearly something wrong with the Internet connection.

If the server's network name is specified correctly, the server pings successfully, but the connection with the correct parameters always fails with error 67, then the cause of the problem is the connection blocking from the outside local network... For example, this is exactly what happens at my work, because access to Internet storages via WebDav is blocked by administrators on purpose, probably to prevent information from being leaked to the side. To make sure that this is precisely the reason, you need to try a connection with exactly the same parameters, but from a different network, preferably from your home network, because operators usually do not block WebDAV communications. If the check confirmed that the local admins are blocking the connection, then the problem can be solved only through them.

Error 1244 - the user is not registered

Full text of the error: "The requested operation was not performed because the user is not registered."
This error means that the server did not receive the correct username and password. The reasons can be different, both the incorrect input of the name or password, and their input in the wrong place of the command.

Therefore, with this error, I check that the password is entered correctly and is between the server address and the / user parameter.

Also, the complexity can arise if the password contains special characters that have special meaning in command cmd / bat files, because this part of the line may be interpreted incorrectly. To check this, you can try to temporarily specify an asterisk instead of a password, then the program will ask for a password after launch. If the connection works when you enter the password on request, then you need to check the password for invalid characters. For example, I had one of my passwords containing the ampersand '&', and this resulted in error 1244. It was possible to work around the error by enclosing the password in quotes. But if the password contains a quotation mark, then most likely it will not be possible to bypass it - it is better to change the password by excluding the quotation marks from it.

Repository Actions in a Batch File

How to check that the storage is connected

Verifying that the connection is established and the server is available may be required in batch files. It can be executed with the IF EXIST command.

For example, the cmd / bat file for connecting WebDAV checks if the disk is already connected, then it immediately exits:

If exist Y: \ * echo Already connected. & exit / b 0

Or cmd / bat the backup file checks before unloading that the network drive is available:

If not exist Y: \ * echo Not connected. & exit / b 1

Copying files over WebDAV

Data loss is possible due to client side buffering in standard COPY or in explorer, so it is recommended to use XCOPY with disabled buffering and with size control.

Xcopy * .zip y: \ backup / Y / Z / V / J

Auto map network drive

Opportunity for automatic connection the network drive actually already exists when the computer boots up and is enabled by the / persistent: yes parameter (see above).

The disadvantage of this solution is that there is only one attempt to connect the disk at boot time. If at this moment there was no network connection or the server was temporarily unavailable, the disk will remain unconnected.

The same problem occurs if only the connection command is inserted into startup:

Net use Y: https://webdav.yandex.ru password/ user: email_address/ persistent: yes

Mapping a network drive with check and redo

To make a more reliable solution, I use a cmd / bat file to check the result and try again:

@echo off if exist y: \ * echo Already connected. & exit / b 0: connect net use y: https://webdav.yandex.ru password / user: [email protected] if errorlevel 1 ping 127.0.0.1 -n 60> nul & goto connect

This batch file can be run manually or via autoload.

In order not to interfere with the black window of the bat file, you can hide it by running it through a script, see.