Hi,
We are using OI to 'label' some audio files (.WAV, .MP3, etc ), and having a few problems when the user decides to label some really big files, in excess of 150 Mb each. It doesn't take much to fill a 2 Gb partition.
One solution is to determine all the drives from OI, excluding mapped and CD's,etc, then calculate the amount of free space on any given drive. Then we can give the user a nice message box informing them there is insufficient disk space before we proceed with the 'label'.
Can this be done with OI ?
Thanks,
Peter
Peter-
We did something like this in Arev a few times- it involves running the DOS commands, redirecting them to text files, and osreading them.
For Example, if you NET USE ] foo.txt, foo.txt will contain a listing of all drive mappings. You can gthen loop through each of these drives, or just the one that the user has chosen, and do a dir]foo2.txt, and look for the " FREE " string, to get the XXX MB Free.
Hope it helps-
Mike
There are ways to do this cleanly via the Windows API so your code is not tied to any one network. Please contact us via [email protected] for further details.
World Leaders in all things RevSoft
Mike,
] For Example, if you NET USE ] foo.txt, foo.txt will contain a listing of all drive mappings.
We want to exclude drive mappings, but now that you mention it, we really only want to pass a (known) drive letter.
] do a dir]foo2.txt, and look for the " FREE " string, to get the XXX MB Free.
Thanks, tried the following:
command=dir d:\ /a:d ]d:\foo.txt"retval=Utility("RUNWIN", "command.com /c ": Command)which gives me the info in foo.txt, so yes, now we can search for string 'free' in the last record in foo.txt
Any way of forcing it to run in 'quiet' mode. We can always see a window pop up, very quickly, but very annoying.
Peter
Hi,
Problem now solved with the Sprezzatura product UTILITY32.
With the GETDRIVES method, I can retrieve all the drives (including mapped), drive letters, labels, and know the types (floppy, fixed, network, CD Rom). Then with the GETDISKFREE method, know the amount of free disk space on each drive. The users now will know (msg) if there is enough free space. Fantastic product, returns long filenames, and lots more.
Usual disclaimer, I have no business association or otherwise with The Sprezzatura Group, just pleased that Utility32 adds extra functionality to our OI applications (and gets rid of those ugly tildes ).
Peter