Windows batch processing settings USB drive letter U "non-PE"

Source: Internet
Author: User

The following two files are created under the USB drive:

Getu.bat

Setu.bat

Direct double-click to run Getu.bat, Setu.bat can be hidden.

The contents of Getu.bat are as follows:

@echo off
Set "u=%cd:~0,1%"
Echo.&echo your USB drive letter is%u% disk
Echo%u%
:: Echo%u% >%cd%%u%.txt

Copy%cd%setu.bat C:\setU.bat
Call C:\setU.bat%u%

Pause

The contents of Setu.bat are as follows:

@echo off

Set old=%1:
Set New=u:
pushd%new% 2>nul && echo%new% disk already exists! && Pause && goto:eof
for/f%%i in (' Mountvol%old%/L ') do set "vol=%%i"
Mountvol%old%/d
Mountvol%new%%vol%
popd
Del%0

This article is from the "Day of Struggle Together" blog, please be sure to keep this source http://eblog.blog.51cto.com/4744499/1765139

Windows batch processing settings USB drive letter U "non-PE"

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.