1.

Solve : DISKPART bat?

Answer» HI to all i just join this wonderful forum. i like computers and stuff like these kind of taste of programming, since i dont study programming my knowledge is bit little.



my point is i WANT to make a batch file to run DISKPART

i started with still line
START C:\Windows\SYSTEM32\DISKPART.EXE

now for the PART where i would need to set to choice to SELECT VOLUME 3 how do i add these kind of paremeters??? thanks You would create a text file with the commands you want Diskpart to execute, and then invoke Diskpart with the textfile path and name as one of the parameters.

http://blogs.msdn.com/embedded/archive/2005/12/23/506404.aspx

http://support.microsoft.com/default.aspx?scid=kb;en-us;300415

I actually wrote a batch file using diskpart and turned it into a USB Pen Drive Letter switching EXECUTABLE. The problem is that you cant hard code the Volume selection or the drive letter to assign it to!! So what i did was take the users input, export it into a text file and then run disk part against the text file using the -s (script)parameter.

Here's my code if you'd like to take a look and the executable itself can be downlaoded from here:
http://feartechsolutions.proboards.com/index.cgi?board=feartechprograms&action=display&thread=1

Code: [Select]@echo off
color 0E
mode con lines=22 cols=86
echo>list.txt
echo>list.txt list volume
@echo on
diskpart -s list.txt
@echo off
set /p DLA=Enter desired volume:
echo:
set /p LTT=Enter drive letter:
echo:
echo>move.txt
echo>move.txt list volume
echo>>move.txt select volume %DLA%
echo>>move.txt assign letter=%LTT%
@echo off
diskpart -s move.txt
echo:
Del /f "list.txt"
Del /f "move.txt"
echo:
echo:
pause
exit /b

Hope this HELPS

Russ


Discussion

No Comment Found