Files on flash drive exist but invisible

The intent of this forum is to discuss my DOS TSR programs (available at http://bretjohnson.us), how they work and don't work, new/missing features, status of updates, and anything else related to them that may need to be discussed.

Files on flash drive exist but invisible

Postby Pinkpuff » Sat Oct 03, 2009 12:11 am

Ok so now that the drives are being recognized, I did some toying around with moving data to and from them and encountered this strange behaviour. It seems that at first I could read from the drives just fine. Everything that was on there originally was showing up correctly when I used, say, dir. However, I xcopied a bunch of stuff over to one of them and now when I dir, almost none of it shows up. Though, if I try to cd into a directory I know should be there, I am able to do that, or if I try to edit a txt file that isn't showing up, it lets me edit it.

So it seems the data is there it's just that dir isn't reporting it correctly. I couldn't find anything relevant in usbintro.doc... any ideas?
Pinkpuff
 
Posts: 9
Joined: Thu Oct 01, 2009 4:50 am

Re: Files on flash drive exist but invisible

Postby Bret » Sat Oct 03, 2009 1:39 am

It sounds like you may have a disk caching program gone awry. Some disk caching programs don't work correctly with removable hard drives like USBDRIVE provides, especially if the disk caching program was installed before USBDRIVE was. INT 13h based disk caching programs also don't work correctly with USBDRIVE, since USBDRIVE does not issue INT 13h calls for DOS drive access.

I've not seen the problem you're describing before, though. I don't normally use disk caching programs. However, I know that if I install MS-DOS SMARTDRV before I install USBDRIVE, weird things happen and the computer usually crashes. If I install SMARTDRV after USBDRIVE, it seems to work OK.

If you're not using a disk cache, try messing around with the BUFFERS setting in CONFIG.SYS (make it smaller or bigger) and see if that helps.

Bret
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Files on flash drive exist but invisible

Postby Pinkpuff » Sat Oct 03, 2009 3:34 am

Hi Bret,

I am not using a disk cache (at least not to my knowledge; I can't see anything even remotely like that in my config.sys or autoexec.bat). I tried fooling with the BUFFERS setting, I tried a wide variety of numbers, but it didn't make any difference.

Any further ideas for where to go from here?
Pinkpuff
 
Posts: 9
Joined: Thu Oct 01, 2009 4:50 am

Re: Files on flash drive exist but invisible

Postby Bret » Sat Oct 03, 2009 9:46 am

There are a couple of things I can think of. There could be some cross-linked or otherwise corrupted data on the disk. Try running CHKDSK or SCANDISK or some equivalent and see if it finds anything.

Though a remote possibility, the only other thing I can think of right now is that the disk somehow got formatted with a utility that doesn't understand the "correct" relationship between CHS (Cylinder-Head-Sector) and absolute sector (LBA). For awhile there were some companies that were using various formulas that were wrong, and disks couldn't be used with anybody elses controllers or systems. That was supposed to have been resolved long before USB was developed, so I doubt that's the issue.

If CHKDSK or SCANDISK doesn't fix it, I would try re-partitioning and re-formatting it.

If you let me know what version of DOS you're using and what brand & model of disks, I might be able to try and duplicate it, assuming I have a similar disk.

FWIW, I don't think this is directly related to USBDRIVE (though it could be). USBDRIVE never "interprets" anything related to the FAT, directories, files, file attributes, or anything like that -- it lets DOS do that. All USBDRIVE does is provide physical access to the disk and retrieves data from the sector where it was asked to.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Files on flash drive exist but invisible

Postby Pinkpuff » Sat Oct 03, 2009 12:00 pm

Hi,

I tried Scandisk, it scanned the directory structure correctly (it seemed to be able to see all the directories that should be there) and reported no errors. It offered to do a physical scan but predicted that it would take something like 38 hours so I said "no". I haven't tried reformatting it yet but I did try my other flash drive in there and tried xcopying stuff over and the result was the same. Only the "first" file to get copied was being reported by dir, even though the other folders and files definitely existed and were even accessible (it's very odd being in a folder that it doesn't think is there; you type "dir" and it only lists ". <dir>", not even ".. <dir>"!).

Thus, I'm inclined to think that the problem is either with dir (which seems to work fine on every other hard drive / partition / CD / etc), with xcopy, or with USBDRIVE.
Pinkpuff
 
Posts: 9
Joined: Thu Oct 01, 2009 4:50 am

Re: Files on flash drive exist but invisible

Postby Bret » Sun Oct 04, 2009 1:18 am

Pleaswe keep experimenting, re-formatting, etc., and see what happens. I've never seen anything like that before. LIke I said earlier, I don't know what USBDRIVE could be doing to cause something like that, though I suppose almost anything is possible. The fact that you see the data sometimes but not other times indicates that the data must actually be on the disk (in the FAT).

Do you have VERIFY ON set in AUTOEXEC.BAT? I don't think that will make any difference, but it may be worth a shot.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Files on flash drive exist but invisible

Postby Pinkpuff » Sun Oct 04, 2009 2:04 am

Verify on
Made no difference.

Reformatting
I re-formatted the drive with fat16 under linux on my desktop, then put it back into my DOS laptop and tried dir. It correctly reported "file not found". I tried
Code: Select all
h:
md temp
dir

and it correctly reported "temp <dir>". I then tried
Code: Select all
cd temp
copy c:\dummy\dummy1.txt
dir

and it copied the file to the flash drive and correctly reported its existence. I then tried
Code: Select all
copy c:\dummy\dummy2.txt
dir

It copied the file but only reported the existence of dummy1.txt, not of dummy2.txt. I tried
Code: Select all
edit dummy2.txt

and it correctly loaded the file and displayed the correct contents.

So clearly the files are there, it just seems that dir is only reporting the "first" file or folder copied to a directory. It (dir) does not have this behaviour on any hard drive or any other type of drive, and it did not have this behaviour under the old DOS USB driver I was using (though, that one would not even recognize the 2 GB drive at all, only the 256 MB one!). Linux reports correctly the existence of all files on the drive that should be there.

Thus, I think that since the files are being reported correctly by everything but dir, and it always occurs with any flash drive and never with any other type of drive, the problem is unlikely to be the flash drive itself. Since dir is reporting correctly for everything besides the flash drives, I think the problem is likewise unlikely to be dir.

For reference, I'm using
  • OS: MS-DOS 6.22
  • Computer: IBM Thinkpad T40
  • Flash Drives: Transcent Jetflash JF V30 2 GB, Transcend Jetflash JF 110 256 MB
Pinkpuff
 
Posts: 9
Joined: Thu Oct 01, 2009 4:50 am

Re: Files on flash drive exist but invisible

Postby Bret » Sun Oct 04, 2009 4:00 am

I think the next logical troubleshooting step is to make sure there are no conflicts with other device drivers or TSR's. REM out all of the entries in you CONFIG.SYS and AUTOEXEC.BAT (including HIMEM & EMM386) and see what happens. If it works with no other drivers or TSR's installed, then it's probably a TSR conflict. Add back in the entries one at a time until you see which one may be causing the problem. Keep in mind that it can be a combination of two or more that are causing the problem, also.

I use DOS 6.20 all the time, but I don't have any Transcend drives, so I can't exactly replicate your situation.
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Files on flash drive exist but invisible

Postby Pinkpuff » Sun Oct 04, 2009 1:32 pm

Aha, that did the trick! It turned out to be the CD-ROM driver. Apparently if I put USBUHCIL and USBDRIVE before the CD-ROM driver rather than after it, suddenly everything seems to be working correctly.

Thank you so much for your help!
Pinkpuff
 
Posts: 9
Joined: Thu Oct 01, 2009 4:50 am

Re: Files on flash drive exist but invisible

Postby Bret » Sun Oct 04, 2009 10:50 pm

COuld you let me know which CD-ROM driver that is and maybe even send or post a copy of it?
Bret
 
Posts: 478
Joined: Fri Oct 10, 2008 3:43 am
Location: Rio Rancho, NM

Re: Files on flash drive exist but invisible

Postby Pinkpuff » Mon Oct 05, 2009 3:07 am

Sure.

It's SHSUCDX V3.03
Attachments
shcdx33e.zip
(37.7 KiB) Downloaded 924 times
Pinkpuff
 
Posts: 9
Joined: Thu Oct 01, 2009 4:50 am


Return to Programs

Who is online

Users browsing this forum: No registered users and 2 guests

cron