

Use Windows File Explorer to navigate to the Apps folder, as shown in Figure A, and right-click on an open area in the righthand window. It does not matter where this batch file is located, but I would suggest somewhere on the operating system drive (typically C:). Probably the best way to describe it is that batch files are a form of scriptingįor our purposes, we will create a simple text file with the “.bat” extension with only one line in it. These are the kinds of commands you would issue from the standard command prompt. SEE: OneDrive Cloud Usage Policy (TechRepublic Premium) Permanently map OneDrive to a drive letter with a batch fileįor those of you not as ancient as me, a batch file is a simple text file that Windows interprets as a series of commands. However, we can still use a batch file to run our subst command at startup, but only if we mix the old with the new and link the file to the right folder. In the days of DOS we could make our mapped drive permanent through an autoexec.bat file that runs during the boot process, but that will not work with Windows 10 or Windows 11. Must-read Windows coverageĭefend your network with Microsoft outside-in security services

Each restart or reboot of your PC will remove the mapping, so we must take the next step to make it constant. While the use of a DOS command is effective, it is not permanent. This trick was needed because neither Windows 10 nor Windows 11 will allow users to map OneDrive through conventional methods. Previously, we outlined a method for mapping a drive letter to Microsoft OneDrive using the old “subst” DOS command. For more info, visit our Terms of Use page. This may influence how and where their products appear on our site, but vendors cannot pay to influence the content of our reviews. We may be compensated by vendors who appear on this page through methods such as affiliate links or sponsored partnerships. Using a little-known feature of Windows 10 and 11, we can automatically designate a specific drive letter to Microsoft OneDrive at startup every time we boot up our PC. How to permanently map OneDrive to a drive letter using a batch file
