If REPORT_TYPE1 = 1 Then Str_Path = "D:\REPORTS\Batch_Rpt\" End If If REPORT_TYPE2 = 1 Then Str_Path = "D:\REPORTS\Custom_Rpt\" End If Set FSO = CreateObject("Scripting.FileSystemObject") 'deleting file Set temp_files = FSO.GetFolder("D:\REPORTS\temp\").Files For Each file In temp_files path = file Kill path Next ' Define folder we want to list files from Set RPT_Folder = FSO.GetFolder(Str_Path) Set R_Files = RPT_Folder.Files
Str_Path
REPORT_TYPE1
REPORT_TYPE2
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)