@echo off
echo>list.txt
echo>list.txt list volume
diskpart -s list.txt
echo>move.txt
echo>move.txt list volume
echo>>move.txt select volume 4
echo>>move.txt remove letter=D
diskpart -s move.txt
Del /f "list.txt"
Del /f "move.txt"
=========================
@echo off
echo>list.txt
echo>list.txt list volume
diskpart -s list.txt
echo>move.txt
echo>move.txt list volume
echo>>move.txt select volume 4
echo>>move.txt assign letter=D
diskpart -s move.txt
Del /f "list.txt"
Del /f "move.txt"