Urgent : Delete file system folder

Hi All,

I m wokring on Lotus Notes R6.0. I have a folder like “C:\Test” in this folder i have 10 file with the extension of .doc,.txt,.jpg etc. I want to delete the folder Test with file contains thr lotusscript code. So how to do this?

Actually i have written a agent in lotusscript what i m doing wrong in code? It’s not working.

Sub Initialize

Dim fileName As String

Dim pathName As String

pathName$ = "C:\Test\*.*"

fileName$ = Dir$(pathName$, 0)



Do While fileName$ <> ""

	Print "<BR>"

	Print fileName$

	fileName$ = Dir$()

	Kill fileName$

	Rmdir "C:\Test"

Loop

End Sub

Thx in Advance,

Santosh.

Subject: Urgent : Delete file system folder

One thing i can say is you are removing directory in Loop.I think you can try by taking it out from the loop.

Subject: 2 Problems, you are only killing every other file and as noted above…

Your Rmdir is inside the loop. Try:Sub Initialize

Dim fileName As String

Dim pathName As String

pathName$ = "C:\Test\*.*"

fileName$ = Dir$(pathName$, 0)

Do While fileName$ <> ""

	Print "<BR>"

	Print fileName$

	Kill fileName$

	fileName$ = Dir$()

Loop

Rmdir "C:\Test"

End Sub