VBScript to move file with wildcard, if it exists
问题 I am attempting to create a script that checks for the existence of archived eventlog files and, if any files exist, moves them to another folder. Running this script does nothing and gives no errors. I believe the wildcard in the If statement is what is giving me issues. I am new to vbscript, and scripting in general, and would appreciate some advice. Set fso = CreateObject("Scripting.FileSystemObject") If (fso.FileExists("d:\eventlogs\Archive*.evtx")) Then FSO.CopyFile "d:\eventlogs\Archive