Computing.Net > Forums > Web Development > ftp problem

ftp problem

Reply to Message Icon

Original Message
Name: genevieve
Date: February 23, 2004 at 07:20:05 Pacific
Subject: ftp problem
OS: linux/intel
CPU/Ram: 1G
Comment:

I try to ftp files every hour automatically (crontab). The file name is changing by time and date. Does anyone know a solution to ftp files where the name changes? I tried the following, after having established a ftp connection:
ascii
put $file, ...
does not work...Any ideas?


Report Offensive Message For Removal

Response Number 1
Name: Don Arnett
Date: February 23, 2004 at 07:54:35 Pacific
Subject: ftp problem
Reply: (edit)

I imagine that you are using a .netrc that contains the FTP commands. What we did was write a script that generates the .netrc on the fly, the runs it.

That way, your script can use the $file variable to output the proper filename to the .netrc file.


Report Offensive Follow Up For Removal

Response Number 2
Name: genevieve
Date: February 23, 2004 at 08:10:00 Pacific
Subject: ftp problem
Reply: (edit)

Thanks for your help; I eventually found a "not so elegant" solution to my problem:
once the ftp connection is established, I simply added into my script:
put file*.*

so that the changing file extension (depends on time and date) is always taken into account.


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: ftp problem

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software