Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need Script to Pull Only .doc Extensions

Status
Not open for further replies.

cghoga

Programmer
Jun 26, 2003
614
US
I'm trying to only pull files from a directory with, for example, .doc extensions. I've tried *.doc, but this doesn't seem to work.

Can anyone help?
 
Here is the code I have thus far.

proc main

string sPath string sFile string sConnection

sPath = "X:\ThcCcs\Edi\Berkley\Outbox\" sFile = "*.doc" sConnection = "Berkley"
dial FTP sConnection
ftp local chdir sPath ftp local copyfile sFile

endproc

Thanks for your help.
 
You can use set ftp filter remote "*.doc" in your script so that only files with a .doc extension are displayed in Procomm's FTP client. However, you'll need to manually download each file as most FTP servers that I've tested with will not allow Procomm to retrieve *.doc and get all .doc files.

I have a sample script at that includes some code that shows how to get the file listing and parse it (lines 36-50 roughly). That may get you going as well.


aspect@aspectscripting.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top