New File Creation



I have and issue with if you already have a filename created how can i
get it to check and make
sure that if a file name is already created it will sequence in the
correct order.

Dim txtFile As New FileInfo(strTempFile)
If txtFile.Exists Then
stream = New FileStream(strTempFile,
FileMode.CreateNew)
End If


When i call this check it will not create a new filename and sequence
however it will tell me that the file is already there...how can I
create a newfile with an incremented sequence.

Now i know there is no code for the file sequence which works jsut
find. However I am asking if anyone has an idea as to why when i call
the CreateNew File it will not create a new file.

.



Relevant Pages

  • Re: Sort files by filename
    ... Mark Haney wrote: ... are out of sequence as is, changing the filename would eliminate that ... Is there a reason why rsync cannot be used for this? ...
    (Fedora)
  • Re: problam in nesting loop
    ... Your Programm is so good and it's working for two files. ... is I don't want to give two input filename. ... First one is Sequence ID and Second ... is i have to put loop for get Gap Sequence too .Because this Sequence ...
    (comp.lang.perl.misc)
  • Re: errors when run catproc.sql
    ... > spool <filename> ... > prior to ... > the sequence ...
    (comp.databases.oracle.server)
  • Re: File names for various digital cameras and RAW extensions
    ... Filename for photos: Canon with IMGxxx, Panasonic with Pxxx, Casio ... Some Olympus cameras use "pMMDDNNNN", where MM is the month, DD ... is a sequence number. ...
    (rec.photo.digital)
  • Re: New File Creation
    ... that you want to create a brand new file and fails if the file already ... would have to change the name for the fileinfo object to be able to create a ... When i call this check it will not create a new filename and sequence ... the CreateNew File it will not create a new file. ...
    (microsoft.public.dotnet.languages.vb)