LotusScriptでローカルにファイルが存在するか確認する方法

使用するのはDir関数

構文
Dir[$] [ ( fileSpec [ , attributeMask ] ) ]

*********************************************************************************

'c:\DATA に hoge.txt ってファイルがあったらメッセージを出力する。

Dim pathName As String, fileName As String, targetfileName as String
pathName$ = "c:\DATA\"
fileName$ = Dir$(pathName$, 0)
targetfileName = "hoge.txt"

Do While fileName$ <> ""
   If fileName$ = targetfileName then
      Msgbox targetfileName & " exists.", , ""
   End If
   fileName$ = Dir$()
Loop

 

LotusDominoDesigner8.5開発者ガイド

LotusDominoDesigner8.5開発者ガイド