Welcome to Dream.In.Code
Become a VB.NET Expert!

Join 149,929 VB.NET Programmers for FREE! Get instant access to thousands of VB.NET experts, tutorials, code snippets, and more! There are 1,776 people online right now. Registration is fast and FREE... Join Now!




Wildcards in VB.net

 
Reply to this topicStart new topic

Wildcards in VB.net

angelicred
12 Dec, 2007 - 12:20 PM
Post #1

New D.I.C Head
*

Joined: 12 Dec, 2007
Posts: 3


My Contributions
I am trying to download files with the following format

IESO_yyyymmdd_v1.xml
IESO_yyyymmdd_v2.xml
IESO_yyyymmdd_v3.xml
IESO_yyyymmdd_v4.xml
IESO_yyyymmdd_v5.xml
IESO_yyyymmdd_v6.xml

Since the v"n" changes every hour I can make itfixed inside of the code. Can someone help me with this.
User is offlineProfile CardPM
+Quote Post

RodgerB
RE: Wildcards In VB.net
12 Dec, 2007 - 04:55 PM
Post #2

D.I.C Lover
Group Icon

Joined: 21 Sep, 2007
Posts: 2,166



Thanked: 17 times
Dream Kudos: 2200
Expert In: Dot Net Technologies

My Contributions
Hi angelicred,

When you want it to download every hour, does it reset to zero on the next day or is it continuous? If it reset's I have created this code for you here:

CODE

My.Computer.Network.DownloadFile("http://www.mywebsite.com", "IESO_yyyymmdd_v" + _
System.DateTime.Now.Hour.ToString() + ".xml")


Hope that helps. smile.gif

This post has been edited by RodgerB: 12 Dec, 2007 - 04:57 PM
User is offlineProfile CardPM
+Quote Post

angelicred
RE: Wildcards In VB.net
13 Dec, 2007 - 06:55 AM
Post #3

New D.I.C Head
*

Joined: 12 Dec, 2007
Posts: 3


My Contributions
QUOTE(RodgerB @ 12 Dec, 2007 - 05:55 PM) *

Hi angelicred,

When you want it to download every hour, does it reset to zero on the next day or is it continuous? If it reset's I have created this code for you here:

CODE

My.Computer.Network.DownloadFile("http://www.mywebsite.com", "IESO_yyyymmdd_v" + _
System.DateTime.Now.Hour.ToString() + ".xml")


Hope that helps. smile.gif


That does. Thank you very much biggrin.gif
User is offlineProfile CardPM
+Quote Post

angelicred
RE: Wildcards In VB.net
13 Dec, 2007 - 10:03 AM
Post #4

New D.I.C Head
*

Joined: 12 Dec, 2007
Posts: 3


My Contributions
Ok New Question

What if the numbers go from 1 - 25?
the datetime.hours go from 0-23. How would I get the 24 and the 25 file?

User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 1/8/09 03:20PM

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter

Live VB.NET Help!

VB.NET Tutorials

Reference Sheets

VB.NET Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month