Probably your best option is to first retrieve a list of the files that are on the server, then build your FTP script using that information.
You should be able to get a list of files using DIR or LS to an output file (DISK. The output file is normally called DIROUTPUT. You can retrieve the DIROUTPUT using get. You can then read the DIROUTPUT file in a program and use the data contained in it to create your FTP script with renames if necessary.
How do i do that ?
i am able to write contents to an output file but how can i read this in FTP? or do i read tthis output file in a cl and use the name received in a parameter? don’t know how to do.