I never wrote a batch file, and now I have to write a batch file that runs a command line and parse its output. (e.g: CMD: Diskpart List volume, Output: list of volumes and the free space, I want to find the volume with the maximum free space)
My questions:
- what should I write to get the output?
- How can I parse it?
Thanks you all,
DiskPart list volumes will not give you free space, but I assume that was only an example.
This batch will give you drive with maximum capacity on your system.
It uses enough constructs to get you going with your own requirements…
You will need to put the following into a batch file