At which point it is wrong ?
In WinPE, %systemdrive% (X:) is Internal Disk or External Disk ? Is it RAMDRIVE ?
Should we not first list all Drive letters of Disk 0 (Internal Harddisk) for getting %MostFreeInt% and %MostFreeIntMB%
and All Drive Letters of Removable Drives to get %MostFreeExt% and %MostFreeExtMB% ??
Exactly in the point I tried to make on post #41:
If you don't understand something , it is OK if you ask for clarifications , but insisting on the same thing, once you have been told why it is "wrong" (even if you don't understand the reason) it is not much productive.
It is extremely difficult to have a conversation with someone that simply ignores last reply.
What is your goal?
You want to try to backup on a internal disk that is NOT ANY AMONG "%SYSPART%", "%SYSPART1%" "%SystemDrive%".
If that doesn't work, you want to try to backup to an external disk that is NOT "%SystemDrive%".
So, you don' t NEED to know how much space is free on ANY AMONG "%SYSPART%", "%SYSPART1%" "%SystemDrive%", as ALL these volumes are NOT suitable to receive the backup, NO MATTER how much free space they have.
Thus you REMOVE the NON SUITABLE drive letters BEFORE anything else (this will also result in shorter execution times as there will be less iterations of the loop.
ALLDrives is now a list of ALL found Drive letters minus the Syspart one (that you cannot/don't want to use as backup target).
This way you don't need to check if the MostFree is %Syspart%, because the Mostfree is the most free among the drives excluded %Syspart%, so it CANNOT be %Syspart%.