1. Floppy_Is_Blank Function Request
- Posted by ck lester <cklester at YAHOO.COM> Aug 29, 2000
- 495 views
I need a function executable in Win32 that will return True if disk A: is blank, and False if not. Can anybody tackle this one before I do? Thanks! ck _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
2. Re: Floppy_Is_Blank Function Request
- Posted by Ad Rienks <kwibus at ZONNET.NL> Aug 30, 2000
- 448 views
Hello ck, Use the function if atom(dir("a:*.*")) then ..... If the disk is empty, even if there is no disk in the 'a' drive, dir() returns -1. This is an atom; otherwise the dir() function returns a sequence. Hope this helps, Ad ----- Oorspronkelijk bericht ----- Van: ck lester <cklester at YAHOO.COM> Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU> Verzonden: dinsdag 29 augustus 2000 22:54 Onderwerp: Floppy_Is_Blank Function Request > I need a function executable in Win32 that will return True if disk A: is > blank, and False if not. > > Can anybody tackle this one before I do? > > Thanks! > ck > > > > _________________________________________________________ > Do You Yahoo!? > Get your free @yahoo.com address at http://mail.yahoo.com >
3. Re: Floppy_Is_Blank Function Request
- Posted by ck lester <cklester at YAHOO.COM> Aug 29, 2000
- 457 views
Dude*! Thanks. ck * I don't think I ever use this word outside of cyberspace. Weird. To alleviate my quandary, Ad Rienks suggested: > Hello ck, > > Use the function > if atom(dir("a:*.*")) then > ..... [some snippage occurred] _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
4. Re: Floppy_Is_Blank Function Request
- Posted by Andy Cranston <Andy.Cranston at EUPHONY.CO.UK> Aug 30, 2000
- 466 views
Another take on this... How about running a CHKDSK A: and saving the output to a file. Then look in the file for the two lines similar to: 1457664 bytes total disk space. 1457664 bytes available on disk. Extract the byte counts and compare. If equal then the disk is blank. If not then one or more files/directories are present (even hidden and system ones). Regards, Andy Cranston. -----Original Message----- From: Hawke' [mailto:mikedeland at NETZERO.NET] Sent: 30 August 2000 10:25 To: EUPHORIA at LISTSERV.MUOHIO.EDU Subject: Re: Floppy_Is_Blank Function Request errrrr............. will that take into account, assuredly, hidden/system files being present on that floppy???? im thinking it won't actually :/ --Hawke' > Hello ck, > Use the function > if atom(dir("a:*.*")) then > If the disk is empty, even if there is no disk in the 'a' drive, dir() > returns -1. This is an atom; otherwise the dir() function returns a > sequence. > > Hope this helps, Ad _______________________________________________ Why pay for something you could get for free? NetZero provides FREE Internet Access and Email http://www.netzero.net/download/index.html
5. Re: Floppy_Is_Blank Function Request
- Posted by Bernie <xotron at PCOM.NET> Aug 30, 2000
- 464 views
On Wed, 30 Aug 2000 02:25:23 -0700, Hawke' <mikedeland at NETZERO.NET> wrote: >errrrr............. >will that take into account, assuredly, hidden/system files being >present on that floppy???? >im thinking it won't actually :/ >--Hawke' > >> Hello ck, >> Use the function >> if atom(dir("a:*.*")) then >> If the disk is empty, even if there is no disk in the 'a' drive, dir() >> returns -1. This is an atom; otherwise the dir() function returns a >> sequence. >> >> Hope this helps, Ad > > >_______________________________________________ >Why pay for something you could get for free? >NetZero provides FREE Internet Access and Email >http://www.netzero.net/download/index.html if atom(dir("\\A a:*.*")) then Wouldn't this find hidden files Bernie
6. Re: Floppy_Is_Blank Function Request
- Posted by "Hawke'" <mikedeland at NETZERO.NET> Aug 30, 2000
- 458 views
errrrr............. will that take into account, assuredly, hidden/system files being present on that floppy???? im thinking it won't actually :/ --Hawke' > Hello ck, > Use the function > if atom(dir("a:*.*")) then > If the disk is empty, even if there is no disk in the 'a' drive, dir() > returns -1. This is an atom; otherwise the dir() function returns a > sequence. > > Hope this helps, Ad _______________________________________________ Why pay for something you could get for free? NetZero provides FREE Internet Access and Email http://www.netzero.net/download/index.html
7. Re: Floppy_Is_Blank Function Request
- Posted by Bernie <xotron at PCOM.NET> Aug 30, 2000
- 463 views
Correction I mean this should work if atom(dir("/A a:*.*")) then Bernie
8. Re: Floppy_Is_Blank Function Request
- Posted by Lewis Townsend <keroltarr at hotmail.com> Aug 30, 2000
- 461 views
Hello, >errrrr............. >will that take into account, assuredly, hidden/system files being >present on that floppy???? >im thinking it won't actually :/ >--Hawke' Is dir() capable of seeing hidden and system files? Maybe there's a /h and/or /s arguments that could be applied. I haven't tested it but maybe this would work..? if atom(dir("a:*.* /h /s")) then and then again, maybe not. later, Lewis Townsend _________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com. Share information about yourself, create your own public profile at http://profiles.msn.com.
9. Re: Floppy_Is_Blank Function Request
- Posted by Ad Rienks <kwibus at ZONNET.NL> Aug 30, 2000
- 463 views
- Last edited Aug 31, 2000
Hello Hawke', I think I tested all the possibilities you mentioned, and the statement seems to behave as expected. BTW, 'system' and 'hidden' are only attributes of files, in my opinion. Windows can fool you, as these kind of files are not displayed in Windows Explorer, unless you set some checkboxes. Cheers, Ad ----- Oorspronkelijk bericht ----- Van: Hawke' <mikedeland at NETZERO.NET> Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU> Verzonden: woensdag 30 augustus 2000 11:25 Onderwerp: Re: Floppy_Is_Blank Function Request > errrrr............. > will that take into account, assuredly, hidden/system files being > present on that floppy???? > im thinking it won't actually :/ > --Hawke' > > > Hello ck, > > Use the function > > if atom(dir("a:*.*")) then > > If the disk is empty, even if there is no disk in the 'a' drive, dir() > > returns -1. This is an atom; otherwise the dir() function returns a > > sequence. > > > > Hope this helps, Ad > > > _______________________________________________ > Why pay for something you could get for free? > NetZero provides FREE Internet Access and Email > http://www.netzero.net/download/index.html
10. Re: Floppy_Is_Blank Function Request
- Posted by Ad Rienks <kwibus at ZONNET.NL> Aug 30, 2000
- 453 views
- Last edited Aug 31, 2000
Hello Bernie, It works too, but isn't the /A a reminder from DOS days. In the Euphoria function, it does not seem to be necessary. Actually, the Euphoria dir() is an inbuilt machine_func(22, name) that allows wildcards. Maybe Robert can enlighten this further. Cheers, Ad ----- Oorspronkelijk bericht ----- Van: Bernie <xotron at PCOM.NET> Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU> Verzonden: woensdag 30 augustus 2000 17:04 Onderwerp: Re: Floppy_Is_Blank Function Request > Correction I mean this should work > > if atom(dir("/A a:*.*")) then > > Bernie
11. Re: Floppy_Is_Blank Function Request
- Posted by "Hawke'" <mikedeland at NETZERO.NET> Aug 30, 2000
- 462 views
errrrrrrrrrrrrrrrrrrrrrrr hidden and system are attributes of files, yes... that is a simple fact, and unfortunately, windows and dos wont care if you opine that in a different manner.. if your opinion is that hidden and system are NOT attributes, windows and dos will simply ignore your opine and continue onwards .... the problem lies in the fact that windows is nothing more then a multitasking shell for DOS... if u open a dos prompt window, or reboot into dos mode, and u navigate to the root of your C drive, and at the prompt you type "dir" (or dir /p for pausing if it is long)... take a GOOD look, i'll wager you do NOT see io.sys listed in that listing...explorer is nothing more then a fancy front end GUI for examining files and directories on your system... my worries were how the dir() function in EU was implemented as there are little nuances that could be in the implementation of that function by rob...did he call the bios directly? did he just do a shortcut like: function dir(object param) return system("dir" & param) end function (warning, that code wont work cuz system() needs another argument and im too lazy to look up that argument) (u get the idea im sure) so the issue of dir() looking for hidden/system files is valid as there could be many different ways that rob could have implemented it... in another post, someone mentioned that dir() used as proposed was tested and seemed to find hidden/system files, which is good thing... in another post, someone mentioned using chkdsk and comparing the max bytes to the used bytes....that may not work either because when u have bad sectors on the floppy, those values will not be the same even when the disk is for sure empty....you would have to grep the bad sectors line and how many bytes were used in bad sectors and apply that to your calculations... hope this helps--Hawke' ----- Original Message ----- From: Ad Rienks <kwibus at ZONNET.NL> To: <EUPHORIA at LISTSERV.MUOHIO.EDU> Sent: Wednesday, August 30, 2000 11:22 AM Subject: Re: Floppy_Is_Blank Function Request > Hello Hawke', > > I think I tested all the possibilities you mentioned, and the statement > seems to behave as expected. BTW, 'system' and 'hidden' are only attributes > of files, in my opinion. Windows can fool you, as these kind of files are > not displayed in Windows Explorer, unless you set some checkboxes. > > Cheers, Ad > > ----- Oorspronkelijk bericht ----- > Van: Hawke' <mikedeland at NETZERO.NET> > Aan: <EUPHORIA at LISTSERV.MUOHIO.EDU> > Verzonden: woensdag 30 augustus 2000 11:25 > Onderwerp: Re: Floppy_Is_Blank Function Request > > > > errrrr............. > > will that take into account, assuredly, hidden/system files being > > present on that floppy???? > > im thinking it won't actually :/ > > --Hawke' > > > > > Hello ck, > > > Use the function > > > if atom(dir("a:*.*")) then > > > If the disk is empty, even if there is no disk in the 'a' drive, dir() > > > returns -1. This is an atom; otherwise the dir() function returns a > > > sequence. > > > > > > Hope this helps, Ad > > > > > > _______________________________________________ > > Why pay for something you could get for free? > > NetZero provides FREE Internet Access and Email > > http://www.netzero.net/download/index.html > _______________________________________________ Why pay for something you could get for free? NetZero provides FREE Internet Access and Email http://www.netzero.net/download/index.html