| : What 2415 is for? File version number?  : Does FTPDir return it as a part of the file name?  2415 is the version number.  FTPDir returns it as part of the filename. View the full job.  Full filename: BNAME.DAT;2415 19/24 16-SEP-2002 18:36:29 [PROD,SDPRICE] (RWED,RWED,RE,RE)  Dim FTP_Directory string Dim ExpectedFileType string
 Dim Filelist String
 Dim Isempty Boolean
 Dim CharstoRemove number
 Dim FilelistisEmpty boolean
 Dim FiletypeIsCorrect boolean
 Dim Filetype String
 Dim Filename String
 Dim TargetFilename string
 Dim TargetPathAndFilename string
 Dim DestinationFilenameBuffer string
 Dim DestinationFileName string
 Dim DestinationPathAndFilename string
 //Download Bname.dat file from ftp site  set FTP_Directory, "SYS$CLIENT:[Download.Bname]" set ExpectedFileType, "BNAME.DAT;"
 //Fet directory Listing  FtpDir "xxx.xx.197.137", " xxxx@@xxx.xxxx.com" ,"Pass", FTP_Directory, filelist  // Remove characters from begining of filelist: need to remove 11 plus the length of FTP_Directory  Length (FTP_Directory, CharsToRemove)  Add (11, CharsToRemove, CharsToRemove)  Replace filelist, 1, CharsToRemove, "", filelist  START_MAIN_LOOP:  IsEqual Filelist, "", FilelistIsEmpty  If (FilelistIsEmpty, COMPLETED_PROCESSING_FILELIST, PROCESS_NEXT_FILENAME)  PROCESS_NEXT_FILENAME:  GetToken "),", filelist, filename  Left filename, 24, filename  Trim filename, filename  Mid filename 1, 10, filetype  //Lower filetype, filetype  IsEqual filetype, ExpectedFiletype, FileTypeIsCorrect  If ( FileTypeIsCorrect, completed_processing_filelist, START_MAIN_LOOP )  COMPLETED_PROCESSING_FILELIST:  set (TargetFileName, filename)  //FTPConfig ( "Transfer Mode", "ASCII" )  //Ftp file to directory  ConcatEx FTP_Directory, TargetFilename, TargetPathAndFilename  Set DestinationFilenameBuffer, TargetFilename  GetToken ";", DestinationFilenameBuffer, DestinationFilename  ConcatEx "r:\\my\\folder\\current\\", DestinationFilename, DestinationPathAndFilename  FTPGetFile( "xxx.xxx.xxx.137", "xxxx@@xxx.xxxx.com", "Pass", "TargetPathAndFilename", "DestinationPathAndFilename" )  //Send confirmation of success  MailSend( "Scheduler", " ", "e-mail", "Success: bname.dat file", "The bname.dat file downloaded succesfully" )  Exit  As mentioned at login, via FTPpro, the directory defaults to WEB$USER[INVESTOR]. Could this be a factor why it cannot change directory. While on the ftp site i must manually type in the new directory i want to goto.
 i.e SYS$CLIENT:[Download.Bname]
 
 
 |