Please save this code with .vbs extension and double click at this file icon at your Windows Explorer
Set va = CreateObject("visio.application")
Set FSO = CreateObject("Scripting.FileSystemObject")
va.Visible = True
va.AlertResponse = 7
path = "C:\test\last" ' change this line for your folder
If Right(path, 1) <> "\" Then path = path + "\"
Set fld = FSO.GETFOLDER(path)
For Each fil In fld.Files
If Right(fil.Name, 3) = "vsd" Or Right(fil.Name, 4) = "vsdx" Then ' iterate only for VSD and VSDX docs
Set vd = va.Documents.OpenEx(path & fil.Name, 256)
vd.Save
vd.Close
Set vd = Nothing
End If
Next
va.AlertResponse = 0
va.Quit
Set va = Nothing
MsgBox "TheEnd!!!"