We get a lot of custom requests. We can’t add them all to LimagitoX File Mover so that is why the Pascal Script option was added. To understand the possibilities of Pascal Script we will add some cases to our blog. Please feel free to ask us about the Pascal Script possibilities.
Secondly, the destination for the moving rule is in two seperate locations. Essentially, files from 1-5000 need to go to one location and files over 5001 need to go to another. Is this a job for pascal script? If so do you know of any good tutorials on how to write it? The files are named 1Filename, 2Filename … all the way to 5000Filename
Our solution was the following:
– files from 1-5000 need to go to one location => FIRST DESTINATION– and files over 5001 need to go to another. => SECOND DESTINATION
vari: integer;tmpInt: Integer;tmpStr: String;BeginpsExitCode:= 0;// … add your code heretmpInt := -1;// Get Number Prefixfor i := 4 downto 1 dobegintmpStr := LeftStr(psFilename, i);trytmpInt := StrToInt(tmpStr);Except//End;If tmpInt <> -1 ThenBreak;end;// Check Number PrefixIf tmpInt <> -1 ThenBeginIf (tmpInt <= 5000) And (psDestinationID = ‘ID1’) ThenpsExitCode := 1;If (tmpInt > 5000) And (psDestinationID = ‘ID2’) ThenpsExitCode := 1;EndElsepsLogWrite(2, ‘[Prefix Number Check]’, ‘Not a valid prefix, ‘ + psFilename);End.