Steve see comments in you message
Steve Drake wrote:
> Hello again everyone.
>
> I want to determine if a file name already exists in a directory.
> I have the following little vi to test with:
>
> Text Constant Icon Icon
> "C:\Data\test.tmp" -> String to Path -> New Directory -> error out
>
[SNIP some stuff]
>
>
> Which says there is no error and not even a warning plus in the
> directory C:\Data I have a directory called "test.tmp".
The VI you created is functioning properly, unfortunately it is not what you
want.
The VI is creating a new DIRECTORY, not a new FILE.
In the VI described above replace the New Directory with New File, from the
same
pallete and it will do what you want.
>
>
> Did I miss something it looks like not
hing does what its suppose to.
> I tried to use size as an indication of a files existents but the size
> always came back zero (0) even when the file is reported by Windows to
> be 1K in size.
If you were looking at the directory of the same name as the file then it's
size is zero.
The size of an empty folder is reported as zero by windows.
> Also tried to use the error output of the Open icon,
> hoping I would get an error if the file did not exist and no error if
> it did. I alway came out T for status with a code of 7 and if the file
> was not in the directory it would create one, not what I wanted.
Not sure about this, I use this method all the time and it returns 7 if the
file does not exist but it does not create the file.
Hope this helps and let me know if you need more advice.
Kevin Kent