Here's my current .bat file that I'm using for VI Perform Logic. Is it feasible to incorporate additional logic so that it does a slightly different rename process if the import fails?
! Slade Hornick
! Rename the source file
!
! Put the Import file in something more manageable
! f$=vi2_import_file$ (from slade's orig)
f$=ImportFileName$
!
! Parse out the directory
f_dir$=f$(1,pos("\"=f$,-1))
!
! Parse out the file
f_file$=f$(pos("\"=f$,-1)+1)
!
! Try to create the old directory - if it exists, then move on
directory f_dir$+"old",err=*next
!
! Close the source file, before trying to move it
close (1,err=*next)
!
! Create a name for the new file
f_new$=f_dir$+"old\"+dte(0:"%Y%Mz%Dz-%Hz%mz%sz")+".csv"
rename f$, f_new$
! pause
exit
------------------------------
- Brett
------------------------------