Code: Select all
//Set IGNORESPACES to 1 to force script interpreter to ignore spaces.
//If using IGNORESPACES quote strings in {" ... "}
//Let>IGNORESPACES=1
// Created by Harry Felker 11/04/13
let>RP_WINDOWMODE=2
Run>C:\WINDOWS\system32\notepad.exe
WaitWindowOpen>Untitled - Notepad
// Read the list from specific path
Let>source_dir=L:\BSL Data Research\NEO_Files\list
Let>archive_dir=L:\BSL Data Research\NEO_Files\archive
GetFileList>%source_dir%*.*,files
Separate>files,;,file_names
//Loop to read through the array
if>%filenames_count%>0
Let>k=0
Repeat>k
Let>k=k+1
//Will Switch the Got Focus later=SetFocus>Mediware 10g
SetFocus>Untitled - Notepad
ReadFile>file_names%k%,current_file
Send>%current_file%%CRLF%
//move the file.
StringReplace>filenames%k%,%source_dir%,%archive_dir%,movepath
//then put the name and path back together, using the new path
Movefile>filenames%k%,%movepath%
Until>k,file_names_count
else
mdl>%source_dir% is empty.
endif