473,508 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FTP code - need a wildcard in a string

9 New Member
So, I have my FTP code working... only issue is, the file I need to download from the FTP server will have a new name each day... and the only constant in the naming convention will be the first 28 digits (out of about 35). The first 28 will be a label and the date (ie: HM_PROD_CSV_PARTIAL_20151107), after that, it's just random numbers. No rhyme or reason.

I need to be able to tell the code to look for the label (which is always the same) and today's date (easy enough), but I need a wildcard for the rest of the numbers. But it doesn't like wildcards in the string definition.

Please help! Code is attached.

Expand|Select|Wrap|Line Numbers
  1. conTARGET = "ftp://ftp.myjob.com/MAP_Outbound/HM_PROD_CSV_PARTIAL_201511070405642.zip"                 
  2. Set objFTP = New FTP
  3. With objFTP
  4. .FtpURL = conTARGET  
Nov 8 '15 #1
7 1113
zmbd
5,501 Recognized Expert Moderator Expert
I don't do much with the FTP side; however, have you tried something simple like the asterisk (<shift-8>):
"HM_PROD_CSV_PARTIAL_20151107*.zip" ?
Nov 9 '15 #2
jimswork1341
9 New Member
Yep. Tried it. It looks for the literal string, so it attempts to find the * in the name (and obviously doesn't find it).
Nov 9 '15 #3
Rabbit
12,516 Recognized Expert Moderator MVP
We don't know what FTP library you're using so there's not a whole lot we can tell you about the functions available in said library.

But I'm willing to bet the library, if it doesn't have a wildcard option, at least has a way to traverse the files within the target FTP site. You need to look at the documentation for that library to find the functions you need.
Nov 9 '15 #4
jimswork1341
9 New Member
Well, I'm pretty ignorant to this FTP stuff (I'm barely getting these things to even work), but I can tell you that I downloaded the code from here: http://access.mvps.org/access/modules/mdl0037.htm
Nov 9 '15 #5
Rabbit
12,516 Recognized Expert Moderator MVP
It looks like the documentation is in the file itself and our firewall blocks third party storage sites. Sorry, you'll have to read through the documentation yourself unless someone else on this forum can access that file for you.

But from what I can tell from the description on that page, it says that it can "FTP: Enumerate remote folders" which probably means it can also enumerate the files in those folders. That's probably what you'll have to do.
Nov 10 '15 #6
NeoPa
32,557 Recognized Expert Moderator MVP
Interesting code from Dev Ashish. He's one of the earliest Access MVPs and is also brilliant when it comes to working outside of the standard application object structure. Much of my understanding has come from looking at his work in such areas.

Unfortunately, it's a bit of a black-box situation. Unless you have access to the documentation I can't see a way to use it to get what you need.
Nov 10 '15 #7
jimswork1341
9 New Member
Found a way to get this done - I had my coworker talk to the people who name the files on the FTP site, and they were able to drop the random string at the end of the file name. Success! (Not quite the same as me figuring this out, but I'll take it!) Thanks guys.
Nov 17 '15 #8

Sign in to post your reply or Sign up for a free account.

Similar topics

1
3475
by: Jon Perez | last post by:
For a given list: fruits= Is it possible to do wildcard matches like shown below? 1. "man*" in fruits
4
3310
by: Cliff | last post by:
Hello I'm trying to search for each instance of a string (using wildcards) in another string. I know there is the Like operator, but it seems to be work with booleans and I want to define a string...
2
2103
by: v4vijayakumar | last post by:
How i can execute c++ code in a String? for example, string code = "cout << \"hi\" << endl;"; execute(code); How i can implement that "execute(std::string code)" function?
7
1372
by: TristaSD | last post by:
Hi, Need a string of random numbers from 1 to 6 generated by php, none of the numbers repeat, e.g. 142635, and NOT 114255. Thanks.
0
935
by: haridelphi | last post by:
Hi i'm working as a programmer using Borland developer studio 2006 (Delphi .net) in ASP.NET and C# (code behind) and postgreSQL (backend). I need connection string for it. Now i download...
232
13065
by: robert maas, see http://tinyurl.com/uh3t | last post by:
I'm working on examples of programming in several languages, all (except PHP) running under CGI so that I can show both the source files and the actually running of the examples online. The first...
2
1481
by: Steven W. Orr | last post by:
I really tried. I give up. I got this one last time (for which I'm very grateful). import calendar months = dict() Now I want something that's going to give me a string whose value is the...
6
2911
by: vunet | last post by:
Can I run ASP code from a string? I thought of using this method to get included files as text http://www.asp101.com/articles/michael/dynamicincludes/default.asp but then I need to run it as ASP....
3
1844
by: KleberUK | last post by:
Hello again, I've got an issue. I would like to be able to execute a specific piece of VB code from a string statement. Let me explain. For instance, I know it's possible to run a SQL statement...
0
7226
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7388
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
7049
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5631
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5055
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4709
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3199
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1561
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
422
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.