Skip to main content

check if file exists

  • November 25, 2015
  • 2 replies
  • 0 views

How can I use the File.Exists(filename) statement of VB.Net to Visual Cobol?

2 replies

Lanter Werner
  • Participating Frequently
  • November 25, 2015

How can I use the File.Exists(filename) statement of VB.Net to Visual Cobol?

          *>  Test if File exists

          declare  TestFile as string.

          set      TestFile to "c:\\temp\\testtext.txt"

          if  type System.IO.File::Exists(TestFile)

              display "'" & TestFile & "'" & " exists"

          else

              display "'" & TestFile & "'" & " does not exists"

          end-if.


How can I use the File.Exists(filename) statement of VB.Net to Visual Cobol?

Thanx