Home > Archive > Clipper > January 2005 > Win XP and Directory()
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Win XP and Directory()
|
|
| John Scott 2004-12-09, 3:55 pm |
| Help. An existing app that uses Directory() to get the file name(s)
form a floopy disk has stopped working since it was moved to an Xp
computer. I looked using the debugger and the function returns an
empty array.
John
| |
| Nick Ramsay 2004-12-09, 3:55 pm |
| On Thu, 9 Dec 2004 10:50:44 -0500, "John Scott" <jscott@kw.igs.net>
wrote:
>Help. An existing app that uses Directory() to get the file name(s)
>form a floopy disk has stopped working since it was moved to an Xp
>computer. I looked using the debugger and the function returns an
>empty array.
>
Go & grab IsFloppy() from:
http://www.witzendcs.co.uk/html/links.html
Here's what it does:
IsFloppy()
The purpose of this protected-mode safe function is to allow the
reading of floppy disks from Clipper while operating under Windows
2000 or XP.
To use the function, add the enclosed isfloppy.obj to your link script
& call the function like this:
if IsFloppy("A") // or "B" or any letter
// execute code to access floppy
else
Alert("No or unformatted floppy")
endif
| |
| John Scott 2004-12-09, 3:55 pm |
| I need the function to return an array containing the file names that
are on the diskette. I already have some functions for verifying the
diskett is loaded.
John
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:1vvgr0969a49reu6revh5bitbj6vk98881@
4ax.com...
> On Thu, 9 Dec 2004 10:50:44 -0500, "John Scott" <jscott@kw.igs.net>
> wrote:
>
>
> Go & grab IsFloppy() from:
>
> http://www.witzendcs.co.uk/html/links.html
>
> Here's what it does:
>
> IsFloppy()
>
> The purpose of this protected-mode safe function is to allow the
> reading of floppy disks from Clipper while operating under Windows
> 2000 or XP.
>
> To use the function, add the enclosed isfloppy.obj to your link
> script
> & call the function like this:
>
> if IsFloppy("A") // or "B" or any letter
> // execute code to access floppy
> else
> Alert("No or unformatted floppy")
> endif
>
| |
| Ross McKenzie 2004-12-09, 8:55 pm |
| On Thu, 9 Dec 2004 14:31:12 -0500, "John Scott" <jscott@kw.igs.net>
wrote:
>I need the function to return an array containing the file names that
>are on the diskette. I already have some functions for verifying the
>diskett is loaded.
But I guess they do not work correctly. Nick's does. See below.
>
>John
>
>"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
> news:1vvgr0969a49reu6revh5bitbj6vk98881@
4ax.com...
>
John,
With respect...read Nick's message again...and then do this..
if IsFloppy("A") // or "B" or any letter
// execute code to access floppy
aFiles := Directory("*.DBF" ) // or whatever
else
Alert("No or unformatted floppy")
endif
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
When there's a will, I want to be in it
| |
| John Scott 2004-12-10, 3:55 pm |
| My problem is not recognizing when a diskett is ready, it is when
executing the line
aFiles=Directory("a:*.*")
After this line executes the array aFiles is empty. It worked fine in
Win98 but not on an XP machine. I need a replacement for the
Directory() or ADir() functions. Niether one works in XP Pro with SP2
applied.
John
"Ross McKenzie" <NoJunk_valusoft@optushome.com.au> wrote in message
news:41b8c685.1622062@news...
> On Thu, 9 Dec 2004 14:31:12 -0500, "John Scott" <jscott@kw.igs.net>
> wrote:
>
>
> But I guess they do not work correctly. Nick's does. See below.
>
>
> John,
>
> With respect...read Nick's message again...and then do this..
>
> if IsFloppy("A") // or "B" or any letter
> // execute code to access floppy
> aFiles := Directory("*.DBF" ) // or whatever
> else
> Alert("No or unformatted floppy")
> endif
>
>
> Regards,
>
> Ross McKenzie
> ValuSoft
> Melbourne Australia
>
> valusoft AT optushome DOT com DOT au
>
> When there's a will, I want to be in it
| |
| Nick Ramsay 2004-12-10, 3:55 pm |
| On Fri, 10 Dec 2004 10:46:06 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
>My problem is not recognizing when a diskett is ready, it is when
>executing the line
>
>aFiles=Directory("a:*.*")
>
>After this line executes the array aFiles is empty. It worked fine in
>Win98 but not on an XP machine. I need a replacement for the
>Directory() or ADir() functions. Niether one works in XP Pro with SP2
>applied.
>
Sigh - yes, we know. My function will force XP to read the contents
of the floppy instead of assuming it is empty. You don't need to
replace anything, you just need to persuade XP to give Clipper the
contents of the directory on the floppy. That's what IsFloppy() does.
| |
| pete@nospam.demon.co.uk 2004-12-10, 3:55 pm |
| In article <dKKdnU-3bIAiWSTcRVn-rg@igs.net>
jscottwithoutspam@kw.igs.net "John Scott" writes:
[Please don't top post...]
> My problem is not recognizing when a diskett is ready, it is when
> executing the line
>
> aFiles=Directory("a:*.*")
Perhaps the diskette is not "ready"?
> After this line executes the array aFiles is empty. It worked fine in
> Win98 but not on an XP machine. I need a replacement for the
> Directory() or ADir() functions. Niether one works in XP Pro with SP2
> applied.
I beg to differ; ADIR() works fine on the XP machines I use it on
(admittedly under S87, but I doubt that this is significant).
What I have found though is that certain diskettes that have been
written under LFN-aware versions of Windows will not be read by
DOS apps (or rather the underlying DOS service calls) as these
calls get between LFNs and volume labels. The diskette
gives all the signs of being "not ready".
Try a diskette that has been formatted under plain DOS and which
has only upper case, 8.3 filenames on it.
Pete
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
| |
| Nick Ramsay 2004-12-11, 3:55 am |
| On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
wrote:
>In article <dKKdnU-3bIAiWSTcRVn-rg@igs.net>
> jscottwithoutspam@kw.igs.net "John Scott" writes:
>
>[Please don't top post...]
>
>
>Perhaps the diskette is not "ready"?
>
>
>I beg to differ; ADIR() works fine on the XP machines I use it on
>(admittedly under S87, but I doubt that this is significant).
>What I have found though is that certain diskettes that have been
>written under LFN-aware versions of Windows will not be read by
>DOS apps (or rather the underlying DOS service calls) as these
>calls get between LFNs and volume labels. The diskette
>gives all the signs of being "not ready".
>
It's not quite that simple, Pete. For some reason, Clipper 5.2x (and
maybe others) has a problem accessing the floppy in protected mode
under NT & friends. Do you remember the old CP/M trick where you had
to do ctrl-c on a floppy to get CP/M to re-read the directory when you
changed floppies? (Remember, hell you're probably still doing it ;-)
It's quite similar to that, only XP always insists that there's
nothing on the floppy. What my little function does is a low-level
verify of track 1, side 1 which tests if the floppy is readable
without invoking the DOS error handler if it isn't & also has the side
benefit of making the floppy contents visible to the Clipper app. I
suspect that directly invoking DOS int 13h does "something" to the
VDM, but I have no real evidence other than empirical.
| |
| pete@nospam.demon.co.uk 2004-12-11, 3:55 pm |
| In article <3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@4ax.com>
delete-all-spam2@witzendcs.co.uk "Nick Ramsay" writes:
> On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
[..]
>
> It's not quite that simple, Pete.
It rarely is :-(
> For some reason, Clipper 5.2x (and
> maybe others) has a problem accessing the floppy in protected mode
> under NT & friends.
Ah, so it's a pmode thing -- outside my S87 territory. Apologies
to the OP for the bum steer.
> Do you remember the old CP/M trick where you had
> to do ctrl-c on a floppy to get CP/M to re-read the directory when you
> changed floppies? (Remember, hell you're probably still doing it ;-)
Indeed so -- outed at last <bg>
> It's quite similar to that, only XP always insists that there's
> nothing on the floppy. What my little function does is a low-level
> verify of track 1, side 1 which tests if the floppy is readable
> without invoking the DOS error handler if it isn't & also has the side
> benefit of making the floppy contents visible to the Clipper app. I
> suspect that directly invoking DOS int 13h does "something" to the
> VDM, but I have no real evidence other than empirical.
Hmm -- interesting. Don't you just hate black magic? ;-)
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| Ross McKenzie 2004-12-11, 8:55 pm |
| On Sat, 11 Dec 2004 15:05:27 +0000 (UTC), pete@nospam.demon.co.uk
wrote:
...snipped with a dead chook...
>
>Hmm -- interesting. Don't you just hate black magic? ;-)
>
>Pete
Not if it works for you <g>.
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
When there's a will, I want to be in it
| |
| Bruce Boddington 2004-12-12, 3:55 am |
|
""Ross McKenzie" <NoJunk_valusoft@optushome.com.au> wrote in message
news:41bb91c5.2626484@news...
> On Sat, 11 Dec 2004 15:05:27 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
>
> ...snipped with a dead chook...
>
Ross, I've told you before, you have to leave the poor bloody chooks
alone.........
<g>
Cheers
Bruce
| |
| John Scott 2004-12-12, 3:55 pm |
| I need the function to return an array containing the file names that
are on the diskette. I already have some functions for verifying the
diskett is loaded.
John
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:1vvgr0969a49reu6revh5bitbj6vk98881@
4ax.com...
> On Thu, 9 Dec 2004 10:50:44 -0500, "John Scott" <jscott@kw.igs.net>
> wrote:
>
>
> Go & grab IsFloppy() from:
>
> http://www.witzendcs.co.uk/html/links.html
>
> Here's what it does:
>
> IsFloppy()
>
> The purpose of this protected-mode safe function is to allow the
> reading of floppy disks from Clipper while operating under Windows
> 2000 or XP.
>
> To use the function, add the enclosed isfloppy.obj to your link
> script
> & call the function like this:
>
> if IsFloppy("A") // or "B" or any letter
> // execute code to access floppy
> else
> Alert("No or unformatted floppy")
> endif
>
| |
| John Scott 2004-12-12, 8:55 pm |
|
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@
4ax.com...
> On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
>
>
> It's not quite that simple, Pete. For some reason, Clipper 5.2x
> (and
> maybe others) has a problem accessing the floppy in protected mode
> under NT & friends. Do you remember the old CP/M trick where you
> had
> to do ctrl-c on a floppy to get CP/M to re-read the directory when
> you
> changed floppies? (Remember, hell you're probably still doing it
> ;-)
>
> It's quite similar to that, only XP always insists that there's
> nothing on the floppy. What my little function does is a low-level
> verify of track 1, side 1 which tests if the floppy is readable
> without invoking the DOS error handler if it isn't & also has the
> side
> benefit of making the floppy contents visible to the Clipper app. I
> suspect that directly invoking DOS int 13h does "something" to the
> VDM, but I have no real evidence other than empirical.
>
I tried using your isFloppy() function and it did not clear up the
problem. I used the debugger and saw that isFloppy('A') returned a
true but then when it executed the line aFileList=Directory('A:\*.*')
the aFileList array was empty.I need a method of getting a list of the
file names that are on the floppy. I don't have control over the
formatting of the floppy since it is one that is sent to my client by
an outside agency.
I am using Clipper 5.0, the OS is XP Professional and I have applied
the SP2 update.
John
| |
| pete@nospam.demon.co.uk 2004-12-13, 3:55 am |
| In article <iuOdnWoymIOcOCHcRVn-uQ@igs.net>
jscottwithoutspam@kw.igs.net "John Scott" writes:
> "Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
> news:3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@
4ax.com...
[..]
> I tried using your isFloppy() function and it did not clear up the
> problem. I used the debugger and saw that isFloppy('A') returned a
> true but then when it executed the line aFileList=Directory('A:\*.*')
> the aFileList array was empty.I need a method of getting a list of the
> file names that are on the floppy. I don't have control over the
> formatting of the floppy since it is one that is sent to my client by
> an outside agency.
> I am using Clipper 5.0, the OS is XP Professional and I have applied
> the SP2 update.
Just a stab: try Directory('A') or Directory("A:") either of
which should be functionally equivalent to including the '*.*'.
I seem to recall I had a problem once using Adir("A:\") whereas
Adir("A:") worked <shrug>.
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| John Scott 2004-12-13, 3:55 pm |
|
<pete@nospam.demon.co.uk> wrote in message
news:1102921158snz@nospam.demon.co.uk...
> In article <iuOdnWoymIOcOCHcRVn-uQ@igs.net>
> jscottwithoutspam@kw.igs.net "John Scott" writes:
>
> [..]
>
> Just a stab: try Directory('A') or Directory("A:") either of which
> should be functionally equivalent to including the '*.*'.
> I seem to recall I had a problem once using Adir("A:\") whereas
> Adir("A:") worked <shrug>.
>
> Pete
I tired your suggestion but it did not work. Next I tried the line
run dir a:>Files.txt
and when that line executes I get the message: 'Access Denied' on the
screen
John
| |
| Nick Ramsay 2004-12-13, 3:55 pm |
| On Mon, 13 Dec 2004 11:13:03 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
>
><pete@nospam.demon.co.uk> wrote in message
>news:1102921158snz@nospam.demon.co.uk...
>
>I tired your suggestion but it did not work. Next I tried the line
>
>run dir a:>Files.txt
>
>and when that line executes I get the message: 'Access Denied' on the
>screen
>
OK, that generally means that you don't have rights to access the
floppy - try doing it as Administrator & see what happens.
| |
| Nick Ramsay 2004-12-13, 3:55 pm |
| On Fri, 10 Dec 2004 10:46:06 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
>My problem is not recognizing when a diskett is ready, it is when
>executing the line
>
>aFiles=Directory("a:*.*")
>
>After this line executes the array aFiles is empty. It worked fine in
>Win98 but not on an XP machine. I need a replacement for the
>Directory() or ADir() functions. Niether one works in XP Pro with SP2
>applied.
>
Sigh - yes, we know. My function will force XP to read the contents
of the floppy instead of assuming it is empty. You don't need to
replace anything, you just need to persuade XP to give Clipper the
contents of the directory on the floppy. That's what IsFloppy() does.
| |
| John Scott 2004-12-13, 3:55 pm |
|
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:5ggrr0t1pd2gabg6uik46elm7uara9j77r@
4ax.com...
> On Mon, 13 Dec 2004 11:13:03 -0500, "John Scott"
> <jscottwithoutspam@kw.igs.net> wrote:
>
>
> OK, that generally means that you don't have rights to access the
> floppy - try doing it as Administrator & see what happens.
>
I am logged on as an Administrator.
I can execute the command Dir A: in the DOS window.
John
| |
| Markus Wiederstein 2004-12-13, 3:55 pm |
|
John,
close all other programs like f.e. explorer that currently have/or had
access to the disk drive.
Be sure no other task is running and then retry your test app.
If this works you cannot fix the problem from within clipper,
the user has to close the apps before running the disk operation.
Markus
| |
| Nick Ramsay 2004-12-14, 8:55 am |
| On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
wrote:
>In article <dKKdnU-3bIAiWSTcRVn-rg@igs.net>
> jscottwithoutspam@kw.igs.net "John Scott" writes:
>
>[Please don't top post...]
>
>
>Perhaps the diskette is not "ready"?
>
>
>I beg to differ; ADIR() works fine on the XP machines I use it on
>(admittedly under S87, but I doubt that this is significant).
>What I have found though is that certain diskettes that have been
>written under LFN-aware versions of Windows will not be read by
>DOS apps (or rather the underlying DOS service calls) as these
>calls get between LFNs and volume labels. The diskette
>gives all the signs of being "not ready".
>
It's not quite that simple, Pete. For some reason, Clipper 5.2x (and
maybe others) has a problem accessing the floppy in protected mode
under NT & friends. Do you remember the old CP/M trick where you had
to do ctrl-c on a floppy to get CP/M to re-read the directory when you
changed floppies? (Remember, hell you're probably still doing it ;-)
It's quite similar to that, only XP always insists that there's
nothing on the floppy. What my little function does is a low-level
verify of track 1, side 1 which tests if the floppy is readable
without invoking the DOS error handler if it isn't & also has the side
benefit of making the floppy contents visible to the Clipper app. I
suspect that directly invoking DOS int 13h does "something" to the
VDM, but I have no real evidence other than empirical.
| |
| pete@nospam.demon.co.uk 2004-12-14, 3:55 pm |
| In article <3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@4ax.com>
delete-all-spam2@witzendcs.co.uk "Nick Ramsay" writes:
> On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
[..]
>
> It's not quite that simple, Pete.
It rarely is :-(
> For some reason, Clipper 5.2x (and
> maybe others) has a problem accessing the floppy in protected mode
> under NT & friends.
Ah, so it's a pmode thing -- outside my S87 territory. Apologies
to the OP for the bum steer.
> Do you remember the old CP/M trick where you had
> to do ctrl-c on a floppy to get CP/M to re-read the directory when you
> changed floppies? (Remember, hell you're probably still doing it ;-)
Indeed so -- outed at last <bg>
> It's quite similar to that, only XP always insists that there's
> nothing on the floppy. What my little function does is a low-level
> verify of track 1, side 1 which tests if the floppy is readable
> without invoking the DOS error handler if it isn't & also has the side
> benefit of making the floppy contents visible to the Clipper app. I
> suspect that directly invoking DOS int 13h does "something" to the
> VDM, but I have no real evidence other than empirical.
Hmm -- interesting. Don't you just hate black magic? ;-)
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| Ross McKenzie 2004-12-15, 3:55 pm |
| On Sat, 11 Dec 2004 15:05:27 +0000 (UTC), pete@nospam.demon.co.uk
wrote:
...snipped with a dead chook...
>
>Hmm -- interesting. Don't you just hate black magic? ;-)
>
>Pete
Not if it works for you <g>.
Regards,
Ross McKenzie
ValuSoft
Melbourne Australia
valusoft AT optushome DOT com DOT au
When there's a will, I want to be in it
| |
| Bruce Boddington 2004-12-15, 3:55 pm |
|
""Ross McKenzie" <NoJunk_valusoft@optushome.com.au> wrote in message
news:41bb91c5.2626484@news...
> On Sat, 11 Dec 2004 15:05:27 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
>
> ...snipped with a dead chook...
>
Ross, I've told you before, you have to leave the poor bloody chooks
alone.........
<g>
Cheers
Bruce
| |
| John Scott 2004-12-15, 3:55 pm |
|
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@
4ax.com...
> On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
>
>
> It's not quite that simple, Pete. For some reason, Clipper 5.2x
> (and
> maybe others) has a problem accessing the floppy in protected mode
> under NT & friends. Do you remember the old CP/M trick where you
> had
> to do ctrl-c on a floppy to get CP/M to re-read the directory when
> you
> changed floppies? (Remember, hell you're probably still doing it
> ;-)
>
> It's quite similar to that, only XP always insists that there's
> nothing on the floppy. What my little function does is a low-level
> verify of track 1, side 1 which tests if the floppy is readable
> without invoking the DOS error handler if it isn't & also has the
> side
> benefit of making the floppy contents visible to the Clipper app. I
> suspect that directly invoking DOS int 13h does "something" to the
> VDM, but I have no real evidence other than empirical.
>
I tried using your isFloppy() function and it did not clear up the
problem. I used the debugger and saw that isFloppy('A') returned a
true but then when it executed the line aFileList=Directory('A:\*.*')
the aFileList array was empty.I need a method of getting a list of the
file names that are on the floppy. I don't have control over the
formatting of the floppy since it is one that is sent to my client by
an outside agency.
I am using Clipper 5.0, the OS is XP Professional and I have applied
the SP2 update.
John
| |
| John Scott 2004-12-15, 3:55 pm |
|
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:5ggrr0t1pd2gabg6uik46elm7uara9j77r@
4ax.com...
> On Mon, 13 Dec 2004 11:13:03 -0500, "John Scott"
> <jscottwithoutspam@kw.igs.net> wrote:
>
>
> OK, that generally means that you don't have rights to access the
> floppy - try doing it as Administrator & see what happens.
>
I resolved the problem. I tried writing a simple test program to use
Directory() and it worked. Then I tried disabling my old functions
that tested for a formatted diskette. Once they were removed the
program worked correctly. Then I used your IsFloppy() to test for the
diskette and it worked fine.
Thanks for all your help.
John
| |
| pete@nospam.demon.co.uk 2004-12-15, 3:55 pm |
| In article <iuOdnWoymIOcOCHcRVn-uQ@igs.net>
jscottwithoutspam@kw.igs.net "John Scott" writes:
> "Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
> news:3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@
4ax.com...
[..]
> I tried using your isFloppy() function and it did not clear up the
> problem. I used the debugger and saw that isFloppy('A') returned a
> true but then when it executed the line aFileList=Directory('A:\*.*')
> the aFileList array was empty.I need a method of getting a list of the
> file names that are on the floppy. I don't have control over the
> formatting of the floppy since it is one that is sent to my client by
> an outside agency.
> I am using Clipper 5.0, the OS is XP Professional and I have applied
> the SP2 update.
Just a stab: try Directory('A') or Directory("A:") either of
which should be functionally equivalent to including the '*.*'.
I seem to recall I had a problem once using Adir("A:\") whereas
Adir("A:") worked <shrug>.
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| John Scott 2004-12-15, 3:55 pm |
|
<pete@nospam.demon.co.uk> wrote in message
news:1102921158snz@nospam.demon.co.uk...
> In article <iuOdnWoymIOcOCHcRVn-uQ@igs.net>
> jscottwithoutspam@kw.igs.net "John Scott" writes:
>
> [..]
>
> Just a stab: try Directory('A') or Directory("A:") either of which
> should be functionally equivalent to including the '*.*'.
> I seem to recall I had a problem once using Adir("A:\") whereas
> Adir("A:") worked <shrug>.
>
> Pete
I tired your suggestion but it did not work. Next I tried the line
run dir a:>Files.txt
and when that line executes I get the message: 'Access Denied' on the
screen
John
| |
| Nick Ramsay 2004-12-15, 3:55 pm |
| On Mon, 13 Dec 2004 11:13:03 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
>
><pete@nospam.demon.co.uk> wrote in message
>news:1102921158snz@nospam.demon.co.uk...
>
>I tired your suggestion but it did not work. Next I tried the line
>
>run dir a:>Files.txt
>
>and when that line executes I get the message: 'Access Denied' on the
>screen
>
OK, that generally means that you don't have rights to access the
floppy - try doing it as Administrator & see what happens.
| |
| John Scott 2004-12-15, 3:55 pm |
|
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:5ggrr0t1pd2gabg6uik46elm7uara9j77r@
4ax.com...
> On Mon, 13 Dec 2004 11:13:03 -0500, "John Scott"
> <jscottwithoutspam@kw.igs.net> wrote:
>
>
> OK, that generally means that you don't have rights to access the
> floppy - try doing it as Administrator & see what happens.
>
I am logged on as an Administrator.
I can execute the command Dir A: in the DOS window.
John
| |
| Nick Ramsay 2004-12-16, 8:55 am |
| On Wed, 15 Dec 2004 12:14:37 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
[snipped]
>I resolved the problem. I tried writing a simple test program to use
>Directory() and it worked. Then I tried disabling my old functions
>that tested for a formatted diskette. Once they were removed the
>program worked correctly. Then I used your IsFloppy() to test for the
>diskette and it worked fine.
>
Good - it should work reliably on all Win 9x platforms also.
>Thanks for all your help.
You're welcome. Thanks for reporting back your findings.
| |
| Markus Wiederstein 2004-12-17, 8:55 am |
|
John,
close all other programs like f.e. explorer that currently have/or had
access to the disk drive.
Be sure no other task is running and then retry your test app.
If this works you cannot fix the problem from within clipper,
the user has to close the apps before running the disk operation.
Markus
| |
| John Scott 2004-12-17, 3:55 pm |
|
"Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
news:3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@
4ax.com...
> On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
>
>
> It's not quite that simple, Pete. For some reason, Clipper 5.2x
> (and
> maybe others) has a problem accessing the floppy in protected mode
> under NT & friends. Do you remember the old CP/M trick where you
> had
> to do ctrl-c on a floppy to get CP/M to re-read the directory when
> you
> changed floppies? (Remember, hell you're probably still doing it
> ;-)
>
> It's quite similar to that, only XP always insists that there's
> nothing on the floppy. What my little function does is a low-level
> verify of track 1, side 1 which tests if the floppy is readable
> without invoking the DOS error handler if it isn't & also has the
> side
> benefit of making the floppy contents visible to the Clipper app. I
> suspect that directly invoking DOS int 13h does "something" to the
> VDM, but I have no real evidence other than empirical.
>
I tried using your isFloppy() function and it did not clear up the
problem. I used the debugger and saw that isFloppy('A') returned a
true but then when it executed the line aFileList=Directory('A:\*.*')
the aFileList array was empty.I need a method of getting a list of the
file names that are on the floppy. I don't have control over the
formatting of the floppy since it is one that is sent to my client by
an outside agency.
I am using Clipper 5.0, the OS is XP Professional and I have applied
the SP2 update.
John
| |
| pete@nospam.demon.co.uk 2004-12-18, 12:46 pm |
| In article <iuOdnWoymIOcOCHcRVn-uQ@igs.net>
jscottwithoutspam@kw.igs.net "John Scott" writes:
> "Nick Ramsay" <news@nospam.demon.co.uk> wrote in message
> news:3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@
4ax.com...
[..]
> I tried using your isFloppy() function and it did not clear up the
> problem. I used the debugger and saw that isFloppy('A') returned a
> true but then when it executed the line aFileList=Directory('A:\*.*')
> the aFileList array was empty.I need a method of getting a list of the
> file names that are on the floppy. I don't have control over the
> formatting of the floppy since it is one that is sent to my client by
> an outside agency.
> I am using Clipper 5.0, the OS is XP Professional and I have applied
> the SP2 update.
Just a stab: try Directory('A') or Directory("A:") either of
which should be functionally equivalent to including the '*.*'.
I seem to recall I had a problem once using Adir("A:\") whereas
Adir("A:") worked <shrug>.
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| Nick Ramsay 2004-12-18, 12:46 pm |
| On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
wrote:
>In article <dKKdnU-3bIAiWSTcRVn-rg@igs.net>
> jscottwithoutspam@kw.igs.net "John Scott" writes:
>
>[Please don't top post...]
>
>
>Perhaps the diskette is not "ready"?
>
>
>I beg to differ; ADIR() works fine on the XP machines I use it on
>(admittedly under S87, but I doubt that this is significant).
>What I have found though is that certain diskettes that have been
>written under LFN-aware versions of Windows will not be read by
>DOS apps (or rather the underlying DOS service calls) as these
>calls get between LFNs and volume labels. The diskette
>gives all the signs of being "not ready".
>
It's not quite that simple, Pete. For some reason, Clipper 5.2x (and
maybe others) has a problem accessing the floppy in protected mode
under NT & friends. Do you remember the old CP/M trick where you had
to do ctrl-c on a floppy to get CP/M to re-read the directory when you
changed floppies? (Remember, hell you're probably still doing it ;-)
It's quite similar to that, only XP always insists that there's
nothing on the floppy. What my little function does is a low-level
verify of track 1, side 1 which tests if the floppy is readable
without invoking the DOS error handler if it isn't & also has the side
benefit of making the floppy contents visible to the Clipper app. I
suspect that directly invoking DOS int 13h does "something" to the
VDM, but I have no real evidence other than empirical.
| |
| pete@nospam.demon.co.uk 2004-12-18, 12:46 pm |
| In article <3v7lr0dkbqitk8iscg6r0dtrkq35s863hk@4ax.com>
delete-all-spam2@witzendcs.co.uk "Nick Ramsay" writes:
> On Fri, 10 Dec 2004 17:57:28 +0000 (UTC), pete@nospam.demon.co.uk
> wrote:
[..]
>
> It's not quite that simple, Pete.
It rarely is :-(
> For some reason, Clipper 5.2x (and
> maybe others) has a problem accessing the floppy in protected mode
> under NT & friends.
Ah, so it's a pmode thing -- outside my S87 territory. Apologies
to the OP for the bum steer.
> Do you remember the old CP/M trick where you had
> to do ctrl-c on a floppy to get CP/M to re-read the directory when you
> changed floppies? (Remember, hell you're probably still doing it ;-)
Indeed so -- outed at last <bg>
> It's quite similar to that, only XP always insists that there's
> nothing on the floppy. What my little function does is a low-level
> verify of track 1, side 1 which tests if the floppy is readable
> without invoking the DOS error handler if it isn't & also has the side
> benefit of making the floppy contents visible to the Clipper app. I
> suspect that directly invoking DOS int 13h does "something" to the
> VDM, but I have no real evidence other than empirical.
Hmm -- interesting. Don't you just hate black magic? ;-)
Pete
--
"We have not inherited the earth from our ancestors,
we have borrowed it from our descendants."
| |
| Nick Ramsay 2004-12-18, 12:46 pm |
| On Wed, 15 Dec 2004 12:14:37 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
[snipped]
>I resolved the problem. I tried writing a simple test program to use
>Directory() and it worked. Then I tried disabling my old functions
>that tested for a formatted diskette. Once they were removed the
>program worked correctly. Then I used your IsFloppy() to test for the
>diskette and it worked fine.
>
Good - it should work reliably on all Win 9x platforms also.
>Thanks for all your help.
You're welcome. Thanks for reporting back your findings.
| |
| Nick Ramsay 2004-12-21, 3:55 am |
| On Wed, 15 Dec 2004 12:14:37 -0500, "John Scott"
<jscottwithoutspam@kw.igs.net> wrote:
[snipped]
>I resolved the problem. I tried writing a simple test program to use
>Directory() and it worked. Then I tried disabling my old functions
>that tested for a formatted diskette. Once they were removed the
>program worked correctly. Then I used your IsFloppy() to test for the
>diskette and it worked fine.
>
Good - it should work reliably on all Win 9x platforms also.
>Thanks for all your help.
You're welcome. Thanks for reporting back your findings.
| |
| gonzalo.diethelm@aditiva.com 2005-01-05, 3:55 am |
| Nick, I tried accessing the link you provided to get a copy of
IsFloppy, but I get asked for a username/password. Could you provide
another link?
Thanks in advance,
Gonzalo
| |
| Nick Ramsay 2005-01-05, 8:55 am |
| On 4 Jan 2005 19:37:24 -0800, gonzalo.diethelm@aditiva.com wrote:
>Nick, I tried accessing the link you provided to get a copy of
>IsFloppy, but I get asked for a username/password. Could you provide
>another link?
>
Sorry - messing with some FTP settings on the server seems to have
locked http users out.
All fixed now.
| |
| gonzalo.diethelm@aditiva.com 2005-01-05, 3:55 pm |
| Got it now, many thanks.
Gonzalo
| |
| Nick Ramsay 2005-01-12, 8:55 am |
| On 4 Jan 2005 19:37:24 -0800, gonzalo.diethelm@aditiva.com wrote:
>Nick, I tried accessing the link you provided to get a copy of
>IsFloppy, but I get asked for a username/password. Could you provide
>another link?
>
Sorry - messing with some FTP settings on the server seems to have
locked http users out.
All fixed now.
|
|
|
|
|