WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

FTP Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

FtpPut using a File Name that Will Change

Keywords:    fileitemize

Question:

I'm trying to do an ftpPut using a file name that will change. Since you can't use wild cards in the ftpPut command, how can this be accomplish?

Example:

File name is XX97243.01 (this file is generated by a another computer that dynamically construct the name from the julian date and a sequence number).

It would be nice if I could do this:

	ftpPut(ftpSession,"c:\mydir\xx*.*","*.*","A")
or this:
	fname = fileItemize("xx*")
	ftpPut(ftpSession,fname,fname,"A")

Any ideas?


Answer:

  1. ASSUMING there is only 1 XX* file in the current directory:
    flist = fileItemize("xx*")
    fname=ItemExtract(1,flist,@tab)
    ftpPut(ftpSession,fname,fname,"A")
    

Article ID:   W12646
Filename:   FtpPut with Local File Name that Changes.txt
File Created: 1999:04:15:16:48:40
Last Updated: 1999:04:15:16:48:40