Using Net::FTP to get a file I almost know the name of

L

laredotornado

Hello, I am using Net::FTP and I was wondering how I can retrieve a
file if I know three things

1. The extension (e.g. ".txt")
2. The directory in which the file will appear
3. There will be at most one file in that directory with the given
extension.

How would i go about figuring out the full path to that file so that I
can use the Net::FTP->get command?

Thanks, - Dave
 
A

Anno Siegel

Hello, I am using Net::FTP and I was wondering how I can retrieve a
file if I know three things

1. The extension (e.g. ".txt")
2. The directory in which the file will appear
3. There will be at most one file in that directory with the given
extension.

How would i go about figuring out the full path to that file so that I
can use the Net::FTP->get command?

You read the documentation of the module you're using. Take special
note of the ->ls and ->dir methods. Use pattern matching to recognize
the file you want.

Anno
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top