Hello everyone,
I am trying to delete the batch file that's created during the process. Part of the code is as follows:
Sub Batch
Dim Batch_File As String
Dim file_location As String
Open file_location & "BatchFile.bat" For Output As #batch_file
Print #batch_file, "cd " & file_location
Close #batch_file
Batch_File = Shell(file_location & "BatchFile.bat", vbMaximizedFocus)
End Sub
i need to delete the batch file (i.e. file_location & "BatchFile.bat") permanently once the tasks are processed.
i am trying to use the code below to delete the batch file but it doesn't work for some reason
Dim Batch_File_Delete As String
Batch_File_Delete = Shell("del" & file_location & "BatchFile.bat", vbMinimizedNoFocus)
any suggestion guys..
thanks in advance guys!!
best regards
plasma33
Bookmarks