Previous Topic

Next Topic

Book Contents

Book Index

Directory Parsing Script

With this option, you write a script (or use a vendor-supplied script) to parse a directory listing. Directory parsing scripts are written in VBScript and are configured and edited the same as other MOVEit Central scripts. Two directory-parsing-specific functions are available:

Most other MOVEit Central MIxxx functions are not available in a directory parsing script.

To explain the differences between the three versions of the filename, consider a hypothetical FTP server that allows multiple numbered versions of a file, with the version following the filename in a directory listing. Suppose the directory listing looks like this:

MYFILE.DAT;22 45321 2006-05-06 08:11:56 
MYFILE.DAT;21 44090 2006-05-05 17:20:40 
README.TXT;3 8192 2005-12-30 21:38:27

In this directory listing, there are two versions of MYFILE.DAT, with version 22 being the more recent.

Ordinarily, the user will not know in advance which numeric version is desired; the user will only know that they want the most recent version, or perhaps the next-to-most-recent version, etc. Therefore, it would be unreasonable to configure a MOVEit Central source with a filemask that refers to a specific version number.

For the purposes of this FTP server, we can invent a filemask syntax in which the most recent version is referred to as MYFILE.DAT(0), the next most recent version as MYFILE.DAT(-1), etc. However, when transferring the file to the destination, we don't care about the version number at all, because most destination servers will not recognize file versions. We want to name the file simply MYFILE.DAT.

Thus, there are three versions of the name

So, a script parsing this directory listing would do the equivalent of:

FilenameToMatch = "MYFILE.DAT(0)" 
MyDate = "2006-05-06 08:11:56" 
MySize = 45321 
bIsDir = False 
FilenameForGet = "MYFILE.DAT;22" 
FilenameOriginal = "MYFILE.DAT" 
MIDirAddEntry FilenameToMatch, MyDate, MySize, bIsDir, FilenameForGet, FilenameOriginal