Thu. Jan 20th, 2022


With an replace to Microsoft Home windows 11, you may now not simply map OneDrive to a drive letter. As an alternative, you need to resort to the traditional command line system often known as DOS.

windows-hard-drive.jpg

Picture: Cherry b l o s s o m/Shutterstock

Over the previous few years, TechRepublic has printed a number of articles exhibiting you methods and ideas that will let you designate a particular drive letter to Microsoft OneDrive. This was needed as a result of Microsoft now not permits it utilizing typical strategies. Properly now, a reader has knowledgeable us that with the replace to Home windows 11, a kind of methods has change into out of date. So, we should discover one other manner.

As soon as upon a time, lengthy earlier than Home windows and graphical consumer interfaces, private computer systems have been run from the command line utilizing DOS. A lot of these historic legacy instructions are nonetheless viable, even in Home windows 11. That is the place we are going to discover the instructions we have to designate a particular drive letter to Microsoft OneDrive.

SEE: 3 must-have calculator instruments for the tech skilled (TechRepublic Premium)

How one can map OneDrive to a drive letter in Home windows 11

Earlier than we start, a few of chances are you’ll be questioning why you’d need to give OneDrive a drive letter within the first place. I realized a very long time in the past that in the case of how individuals use their PCs, it’s best to flow and assume there’s a good cause.

On this case, a reader requested for assist after discovering {that a} earlier tip now not labored. So, we’re serving to to unravel the issue the most effective we are able to. That stated, what should you have been writing a script in PowerShell that referenced OneDrive? Utilizing a drive letter as shorthand for a particular OneDrive folder may turn out to be useful.

SEE: How one can roll again Home windows 11 and return to Home windows 10 (TechRepublic)  

The very first thing we have to do is begin our command-line session with administrative rights. In Home windows 11, click on the search icon within the taskbar and kind “cmd” into the search field. Choose Run as Administrator from the choices checklist to achieve the command line window proven in Determine A.

Determine A

a-map-onedrive-todrive-ltr.jpg

To perform our activity, we might be utilizing the “subst” command, which is brief for substitute. Its easy operate is to substitute a drive letter for a particular folder recognizable by the working system. The fundamental syntax seems like:

subst [: [:]]

Probably the most tough a part of this trick is figuring out precisely what path your set up of Microsoft OneDrive makes use of based on the working system. To do this, we should benefit from some DOS-level listing browsing.

First sort “cd/” after which sort “dir”. These are the DOS change listing and the show listing instructions respectively, and we’re altering our focus to the basis listing (Determine B) and getting a listing of subdirectories on the primary drive (most probably C:).

Determine B

b-map-onedrive-todrive-ltr.jpg

The OneDrive listing is a subdirectory of a subdirectory of the Customers listing, so we sort “cd/Customers” on the command immediate after which request one other checklist of subdirectories by typing “dir” once more, as proven in Determine C.

Determine C

c-map-onedrive-todrive-ltr.jpg

Now, that is the place it will get fascinating. For my PC, the consumer listing is called “mark” however in your PC will probably be utterly totally different. Regardless of the identify, the following command must be “cd/Customers/(fill in your listing identify)”. For our instance, the instructions could be:

cd/Customers/mark
dir

Your outcomes might be just like the display proven in Determine D. Observe, you need to sort within the full path for the command to work. A DOS limitation.

Determine D

d-map-onedrive-todrive-ltr.jpg

In our instance, the identify of my OneDrive listing known as “OneDrive – Mark W Kaelin”. As you may think about, referencing that in a script might be a nightmare. We will substitute a single drive letter (Z:) for that lengthy string of listing names utilizing this command:

subst z: "c:/Customers/mark/OneDrive - Mark W Kaelin"

Observe the usage of the citation marks. We should encompass our listing path in citation marks as a result of it comprises areas. DOS considers areas to be a break, which suggests it expects the following little bit of textual content to be a brand new command. One other DOS limitation. In fact, your OneDrive listing identify will totally different from mine.

When you now, sort “z:” into the command immediate and kind “dir” you will notice your Microsoft OneDrive listed in all of its DOS glory (Determine E).

Determine E

e-map-onedrive-todrive-ltr.jpg

Shut out the command-line session after which load Home windows File Explorer. While you scroll down the left-hand checklist of folders, you can find Z: on the checklist of accessible drives, as proven in Determine F.

Determine F

f-map-onedrive-todrive-ltr.jpg

Sadly, this setting is just not everlasting. The following time your PC is restarted, this substitution might be misplaced and should be reapplied. If you wish to completely designate a drive letter to Microsoft OneDrive even throughout a restart, you’ll have to resort to a different historic method often known as the autoexec batch file, which is a few deep DOS voodoo requiring its personal separate article.

Additionally see



Source link

By admin

Leave a Reply

Your email address will not be published. Required fields are marked *