itech20059
MIS
Hi new to VB I am trying something simple. To rename a exe if it exists. Eventually I would want to try and delete it. How my if else is not working.
I am getting a Line 2 end of statement expected error at char 57. Can anyone help me out.
Thanks.
I am getting a Line 2 end of statement expected error at char 57. Can anyone help me out.
Thanks.
Code:
If fso.FolderExists ("C:\Program Files\Winamp\")Then
Set objFSO = CreateObject("Scripting.FileSystemObject") objFSO.MoveFile "C:\Program Files\Winamp\winamp.exe" , "C:\Program Files\Winamp\Winamp_is_prohibited.txt";
Else
'Do nothing
End If