import

Kenneth Brody kenbrody at bestweb.net
Mon Jun 27 09:39:48 PDT 2005


Quoting GCC (Mon, 27 Jun 2005 12:08:31 -0400):

> Windows native 5.0.14
> Win XP sp 1
>
> I have a routine I am working on that:
>
> 1. Changes the directory using chdir
> 2. uses a system command to run a batch file which runs a program that
> creates a list of 5 random "passwords" to a file called pass.txt
> 3. Use import to read in the pass file to a 5 element array and display
> the results in a listbox for selecting one of the listed passwords.

Did you close the import when you were done with it?

> So far, so good.  All works as expected.
>
> My problem, when I move to a new record and run the routine again, the
> same group of passwords is displayed.  If I exit IUA and the come back
> into a record and run the routine, a new list is presented.

Does the file contain new passwords?

> It appears that pass.txt is locked.  How would I release this file?

How does it "appear" to be "locked"?

> I did try aa=remove("pass.txt") and tested aa.  According to the help
> file, 0 means the file was removed and a negative number indicates the
> remove failed.
> Does anyone know what a positive 1 indicates?

Is there such a thing as a "-1" system error code?

If you never closed the import, then filePro will be positioned at the
end of the pass.txt file.  (Or at least, not at the beginning, if the
new set of passwords is longer than the old.)  The next thing filePro
will try to get from the file is the non-existent 6th password.  Is the
import simply failing the second time through?

Also, Windows will not let you remove a file that's open by someone.

--
KenBrody at BestWeb dot net        spamtrap: <g8ymh8uf001 at sneakemail.com>
http://www.hvcomputer.com
http://www.fileProPlus.com


More information about the Filepro-list mailing list