I am trying to create a one bat file with diskpart script to automatize process of creating volumes. The problem is that I want to pass parameters like this:
dis
Accordingly to the documentation given at this site, this should work:
@echo off
(
echo select disk 0
echo create volume simple size=%1
echo format quick fs=ntfs label="userTest"
echo assign letter="T"
) > script.txt
diskpart /s script.txt
Copy this code into a Batch file, for example createVolume.bat, and then use it this way:
createVolume 500