I’m trying to "Execute VBScritpt that moves the oldest file from a folder to another.
Dim colFiles Dim strStartFolder Dim strDestinationfolder Dim oOldestFile Dim oFile Dim oFSO strStartFolder = "Source" I=0 Do While I=0 Set oFSO = CreateObject("Scripting.FileSystemObject") Set colFiles = oFSO.GetFolder(strStartFolder).Files If colFiles.Count <= 1 Then WScript.Quit End If For Each oFile In colFiles If Not IsObject(oOldestFile) Then Set oOldestFile = oFile Else If oFile.DateLastModified < oOl [Invoke VBScript.xaml|attachment](upload://A13aRwD3SydHc5KpYu9jKz6GDAk.xaml) (4.4 KB) destFile.DateLastModified Then Set oOldestFile = oFile End If End If Next Do While i=0 oOldestFile.Move strDestinationfolder & "\" & oOldestFile.Name Wscript.Sleep (2000) Loop`Preformatted text`
For now, it moves each file every two minutes starting with the oldest.
But the idea is only to move files when the robot is compiled.
Right now is not working but also I’m not receiving any error
Can someone take a look at my XML file and advise?