Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need to fetch files in drive A; program reports "no files found"

Status
Not open for further replies.

eyeguyhanson

Technical User
Nov 1, 2000
1
US
We have written a program to copy *.jpg files off a 3.5" diskette in drive A to a specified directory on drive C and then view the files. The diskette has just come out of my Sony Mavica camera but it really doesn't matter where the .jpg files have originated.

The program works only part of the time. It seems to be related to whether or not the computer has just accessed drive A prior to running the program. That is, if I just insert the floppy with its .jpg files in drive A and run the program from my desktop, no files get copied to my specified directory on the C: drive. However, if I insert the diskette with its .jpg files in drive A and then access the files on drive A prior to executing the program (like just doing a directory of files)then run the program from my desktop, it works fine and all files on drive get copied to my C: directory and all files get viewed. It seems like accessing drive A prior to running the program must set the path to A: or maybe the files are getting loaded into cache.

I seem to need some code to sort of jump start drive A and gather up its filelist prior to copying the files. I have included within the sequence of commands the following but it doesn't seem to help:
File1.Path = "a:\"

Whatever help anyone might have would be appreciated. Thank you.
 
If you want to copy each file, there are a few ways to do this (as ever). You could try any of the following (and more)

1. Use the shell command run a DOS copy.
2. Use the Dir command to loop through the files on the a drive.
3. Use the common dialog control to select the files (this will probably get over your problem of "jump starting drive A" - but I do not know why this is happening)

Simon
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top