473,626 Members | 3,389 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help for a friend (I don't know where to start!)

I have a friend doing some pro-bono work for a non-profit that does
job training for distressed kids under DCSS care. He asked me for
code to do the following (he's using A2003).

I can't find code in searches or on the MVP and tool sites I visited -
though I might not understand that there is code that just needs
adaptation. ALL help is appreciated.

He wants a routine (that I'd put into a module) to do the following:

The on-line application puts files in the folder every 15 minutes with
a file name & date/time stamp as part of the name, so the file name is
different every time.

He wants the routine to check the folder about every minute (so I also
need to know how to do that)

1) Open folder on server.

2) Are there any files in the folder, if no end
a. If yes, get first filename

b. Import filename to specified table *This doesn't make
sense to me, so I assume he wants the file imported but I will have to
check on that for more specifics.

c. Delete filename ** I think he wants to delete the file
from this folder, not the just the name, so the file won't be there
the next time the routine executes

d. Get next filename, if none, end.

Thanks, everyone!
Sara
Nov 9 '08 #1
7 1841
sara <sa*******@yaho o.comwrote:
>I can't find code in searches or on the MVP and tool sites I visited -
though I might not understand that there is code that just needs
adaptation. ALL help is appreciated.
>1) Open folder on server.

2) Are there any files in the folder, if no end
a. If yes, get first filename
See the Dir command in VBA help.

While highly unlikely if you are running Dir in a loop and call another subroutine
which in turn uses Dir the second set of calls will wipe out the pointer of the first
set of Dir calls.
b. Import filename to specified table *This doesn't make
sense to me, so I assume he wants the file imported but I will have to
check on that for more specifics.
Rename in VBA cmd
c. Delete filename ** I think he wants to delete the file
from this folder, not the just the name, so the file won't be there
the next time the routine executes
Kill
d. Get next filename, if none, end.
Dir again but with an empty string.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/
Nov 9 '08 #2
On Nov 9, 3:01*pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
sara <saraqp...@yaho o.comwrote:
I can't find code in searches or on the MVP and tool sites I visited -
though I might not understand that there is code that just needs
adaptation. *ALL help is appreciated.
1) * Open folder on server.
2) *Are there any files in the folder, if no end
* * * * a. If yes, get first filename

See the Dir command in VBA help. *

While highly unlikely if you are running Dir in a loop and call another subroutine
which in turn uses Dir the second set of calls will wipe out the pointer of the first
set of Dir calls.
* * * * b. Import filename to specified table **This doesn't make
sense to me, so I assume he wants the file imported but I will have to
check on that for more specifics.

Rename in VBA cmd
* * * * c. Delete filename *** I think he wants to delete thefile
from this folder, not the just the name, so the file won't be there
the next time the routine executes

Kill
* * * * d. Get next filename, if none, end.

Dir again but with an empty string.

Tony
--
Tony Toews, Microsoft Access MVP
* *Please respond only in the newsgroups so that others can
read the entire thread of messages.
* *Microsoft Access Links, Hints, Tips & Accounting Systems athttp://www.granite.ab. ca/accsmstr.htm
* *Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
I've looked at this and have a few questions:

Why use Rename? That would put a file out there and it would be
"picked up" again in the next 60 seconds. Could he use
filename.delete ? I figure he'd have the filename, with the path,
which we could create as a variable in the code. Then could he say:
strFileName.del ete? Or Kill strFileName? (Is Kill better? - I had
never heard of it)

Is the Timer function used to run a module every 60 seconds? I will
mention to him the risk with every 60 seconds, and perhaps he can go
to 5 minutes or something. I read one post that seemed to indicate we
should create a form that will always be open I guess it would have to
be hidden), Set the TimerInterval property to something like 60000
(check once every 60 seconds). Put this code (or call to the module)
in the OnTimer event procedure.

I think I understand DIR - it's a little hard for me because they way
I learn is to try and this isn't my app (I am even more impressed now
with how all you MVPs are so well able to offer help!).

Thanks for getting us started!
sara
Nov 9 '08 #3
You might have a look at

http://allapi.mentalis.org/apilist/F...fication.shtml

Phil

"sara" <sa*******@yaho o.comwrote in message
news:5a******** *************** ***********@h23 g2000prf.google groups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
sara <saraqp...@yaho o.comwrote:
I can't find code in searches or on the MVP and tool sites I visited -
though I might not understand that there is code that just needs
adaptation. ALL help is appreciated.
1) Open folder on server.
2) Are there any files in the folder, if no end
a. If yes, get first filename

See the Dir command in VBA help.

While highly unlikely if you are running Dir in a loop and call another
subroutine
which in turn uses Dir the second set of calls will wipe out the pointer
of the first
set of Dir calls.
b. Import filename to specified table *This doesn't make
sense to me, so I assume he wants the file imported but I will have to
check on that for more specifics.

Rename in VBA cmd
c. Delete filename ** I think he wants to delete the file
from this folder, not the just the name, so the file won't be there
the next time the routine executes

Kill
d. Get next filename, if none, end.

Dir again but with an empty string.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems
athttp://www.granite.ab. ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
I've looked at this and have a few questions:

Why use Rename? That would put a file out there and it would be
"picked up" again in the next 60 seconds. Could he use
filename.delete ? I figure he'd have the filename, with the path,
which we could create as a variable in the code. Then could he say:
strFileName.del ete? Or Kill strFileName? (Is Kill better? - I had
never heard of it)

Is the Timer function used to run a module every 60 seconds? I will
mention to him the risk with every 60 seconds, and perhaps he can go
to 5 minutes or something. I read one post that seemed to indicate we
should create a form that will always be open I guess it would have to
be hidden), Set the TimerInterval property to something like 60000
(check once every 60 seconds). Put this code (or call to the module)
in the OnTimer event procedure.

I think I understand DIR - it's a little hard for me because they way
I learn is to try and this isn't my app (I am even more impressed now
with how all you MVPs are so well able to offer help!).

Thanks for getting us started!
sara

Nov 9 '08 #4
On Nov 9, 5:43*pm, "Phil Stanton" <p...@myfamilyn ame.co.ukwrote:
You might have a look at

http://allapi.mentalis.org/apilist/F...fication.shtml

Phil

"sara" <saraqp...@yaho o.comwrote in message

news:5a******** *************** ***********@h23 g2000prf.google groups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:


sara <saraqp...@yaho o.comwrote:
>I can't find code in searches or on the MVP and tool sites I visited -
>though I might not understand that there is code that just needs
>adaptation. ALL help is appreciated.
>1) Open folder on server.
>2) Are there any files in the folder, if no end
a. If yes, get first filename
See the Dir command in VBA help.
While highly unlikely if you are running Dir in a loop and call another
subroutine
which in turn uses Dir the second set of calls will wipe out the pointer
of the first
set of Dir calls.
b. Import filename to specified table *This doesn't make
>sense to me, so I assume he wants the file imported but I will have to
>check on that for more specifics.
Rename in VBA cmd
c. Delete filename ** I think he wants to delete the file
>from this folder, not the just the name, so the file won't be there
>the next time the routine executes
Kill
d. Get next filename, if none, end.
Dir again but with an empty string.
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems
athttp://www.granite.ab. ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

I've looked at this and have a few questions:

Why use Rename? *That would put a file out there and it would be
"picked up" again in the next 60 seconds. *Could he use
filename.delete ? *I figure he'd have the filename, with the path,
which we could create as a variable in the code. *Then could he say:
strFileName.del ete? *Or Kill strFileName? *(Is Kill better? - I had
never heard of it)

Is the Timer function used to run a module every 60 seconds? *I will
mention to him the risk with every 60 seconds, and perhaps he can go
to 5 minutes or something. *I read one post that seemed to indicate we
should create a form that will always be open I guess it would have to
be hidden), Set the TimerInterval property to something like 60000
(check once every 60 seconds). *Put this code (or call to the module)
in the OnTimer event procedure.

I think I understand DIR *- it's a little hard for me because they way
I learn is to try and this isn't my app (I am even more impressed now
with how all you MVPs are so well able to offer help!).

Thanks for getting us started!
sara- Hide quoted text -

- Show quoted text -
Hi Phil -
I looked at that, but I don't understand how it relates to what I'm
looking for. I do't really understand what an API is, or if that's
what is needed in this case, either. Sorry - I'm new to a lot of
this.

Sara
Nov 10 '08 #5
sara wrote:
On Nov 9, 5:43 pm, "Phil Stanton" <p...@myfamilyn ame.co.ukwrote:
>>You might have a look at

http://allapi.mentalis.org/apilist/F...fication.shtml

Phil

"sara" <saraqp...@yaho o.comwrote in message

news:5a****** *************** *************@h 23g2000prf.goog legroups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:

>>>sara <saraqp...@yaho o.comwrote:

I can't find code in searches or on the MVP and tool sites I visited -
though I might not understand that there is code that just needs
adaptatio n. ALL help is appreciated.
1) Open folder on server.
>>>>2) Are there any files in the folder, if no end
a. If yes, get first filename
>>>See the Dir command in VBA help.
>>>While highly unlikely if you are running Dir in a loop and call another
subroutine
which in turn uses Dir the second set of calls will wipe out the pointer
of the first
set of Dir calls.
>>>>b. Import filename to specified table *This doesn't make
sense to me, so I assume he wants the file imported but I will have to
check on that for more specifics.
>>>Rename in VBA cmd
>>>>c. Delete filename ** I think he wants to delete the file

from this folder, not the just the name, so the file won't be there

the next time the routine executes
>>>Kill
>>>>d. Get next filename, if none, end.
>>>Dir again but with an empty string.
>>>Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems
athttp://www.granite.ab. ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/

I've looked at this and have a few questions:

Why use Rename? That would put a file out there and it would be
"picked up" again in the next 60 seconds. Could he use
filename.dele te? I figure he'd have the filename, with the path,
which we could create as a variable in the code. Then could he say:
strFileName.d elete? Or Kill strFileName? (Is Kill better? - I had
never heard of it)

Is the Timer function used to run a module every 60 seconds? I will
mention to him the risk with every 60 seconds, and perhaps he can go
to 5 minutes or something. I read one post that seemed to indicate we
should create a form that will always be open I guess it would have to
be hidden), Set the TimerInterval property to something like 60000
(check once every 60 seconds). Put this code (or call to the module)
in the OnTimer event procedure.

I think I understand DIR - it's a little hard for me because they way
I learn is to try and this isn't my app (I am even more impressed now
with how all you MVPs are so well able to offer help!).

Thanks for getting us started!
sara- Hide quoted text -

- Show quoted text -


Hi Phil -
I looked at that, but I don't understand how it relates to what I'm
looking for. I do't really understand what an API is, or if that's
what is needed in this case, either. Sorry - I'm new to a lot of
this.

Sara
Some of this might help you get started. In a form you have a timer
interval.

In the Form's property sheet the event OnTimer fires if there is a value
in TimerInterval. TimerInterval is input is in milliseconds. One
second is 1000. One minute is 60,000. Set the value to however long
you want the event to "pause" before firing.

In the OnTimer event you will want to check for files. This is some air
code. Assumes timerinterval is 60000.

Private Sub Form_Timer()
'stop the OnTimer event from starting again until processing is complete
Me.TimerInterna l = 0

Dim strFolder As String
Dim strSourceFile 'file path & name
Dim strDestFile As String 'file path & name to be copied to
Dim strDestFolder As String
Dim strFile As String 'file name found in Dir()
Dim strDT as String 'hold the date/time of the dest file
Dim intPos As Integer

'what folder do you want to search and process?
strFolder = "C:\Test\"
strDestFolder = "C:\CopyFilesTo \"

'see if there's any files in the search folder
strFile = Dir(strFolder & "*.*")

'process files in folder until complete
Do while strFile ""
'there's a file
strSourceFile = strFolder & strFile

'....process the source file

'format the date/time to a string value. A filename can't have
'a colon in it so time is separated with dashes as well
strDt = format(now(),"m m-dd-yyyy hh-nn-ss")

'create the destination file name to copy the source file to. Find
'out where the filename's extension begins. Assumes there is an _
'extension. Ex: C:\Test\Test.Tx t, might become
'C:\CopyFilesTo \Test 11-08-2008 11-30-01.Txt" (11-30-01)is the time.
intPos = Instr(strFile," .")
strDestFile = strDestFolder & strFile & " " & strDt & _
Mid(strFile,int Pos)

'now copy the file to the new destination
FileCopy strSourceFile, strDestFile

'now delete the source file
Kill strSourceFile

'now get the next file that exists in the folder
strFile = Dir()
Loop

'for testing purpose
msgbox "Done processing"

'reset/restart the timer interval
Me.TimerInterva l = 60000
End Sub
Nov 10 '08 #6
On Nov 10, 11:41*am, Salad <o...@vinegar.c omwrote:
sara wrote:
On Nov 9, 5:43 pm, "Phil Stanton" <p...@myfamilyn ame.co.ukwrote:
>You might have a look at
>http://allapi.mentalis.org/apilist/F...fication.shtml
>Phil
>"sara" <saraqp...@yaho o.comwrote in message
>news:5a******* *************** ************@h2 3g2000prf.googl egroups.com....
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
>>sara <saraqp...@yaho o.comwrote:
>>>I can't find code in searches or on the MVP and tool sites I visited -
though I might not understand that there is code that just needs
adaptation . ALL help is appreciated.
1) Open folder on server.
>>>2) Are there any files in the folder, if no end
a. If yes, get first filename
>>See the Dir command in VBA help.
>>While highly unlikely if you are running Dir in a loop and call another
subroutine
which in turn uses Dir the second set of calls will wipe out the pointer
of the first
set of Dir calls.
>>>b. Import filename to specified table *This doesn't make
sense to me, so I assume he wants the file imported but I will have to
check on that for more specifics.
>>Rename in VBA cmd
>>>c. Delete filename ** I think he wants to delete the file
>>>from this folder, not the just the name, so the file won't be there
>>>the next time the routine executes
>>Kill
>>>d. Get next filename, if none, end.
>>Dir again but with an empty string.
>>Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems
athttp://www.granite.ab. ca/accsmstr.htm
Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
>I've looked at this and have a few questions:
>Why use Rename? *That would put a file out there and it would be
"picked up" again in the next 60 seconds. *Could he use
filename.delet e? *I figure he'd have the filename, with the path,
which we could create as a variable in the code. *Then could he say:
strFileName.de lete? *Or Kill strFileName? *(Is Kill better? - I had
never heard of it)
>Is the Timer function used to run a module every 60 seconds? *I will
mention to him the risk with every 60 seconds, and perhaps he can go
to 5 minutes or something. *I read one post that seemed to indicate we
should create a form that will always be open I guess it would have to
be hidden), Set the TimerInterval property to something like 60000
(check once every 60 seconds). *Put this code (or call to the module)
in the OnTimer event procedure.
>I think I understand DIR *- it's a little hard for me because they way
I learn is to try and this isn't my app (I am even more impressed now
with how all you MVPs are so well able to offer help!).
>Thanks for getting us started!
sara- Hide quoted text -
>- Show quoted text -
Hi Phil -
I looked at that, but I don't understand how it relates to what I'm
looking for. *I do't really understand what an API is, or if that's
what is needed in this case, either. *Sorry - I'm new to a lot of
this.
Sara

Some of this might help you get started. *In a form you have a timer
interval.

In the Form's property sheet the event OnTimer fires if there is a value
in TimerInterval. *TimerInterval is input is in milliseconds. *One
second is 1000. *One minute is 60,000. *Set the value to however long
you want the event to "pause" before firing.

In the OnTimer event you will want to check for files. *This is some air
code. *Assumes timerinterval is 60000.

Private Sub Form_Timer()
'stop the OnTimer event from starting again until processing is complete
Me.TimerInterna l = 0

Dim strFolder As String
Dim strSourceFile * * * * 'file path & name
Dim strDestFile As String 'file path & name to be copied to
Dim strDestFolder As String
Dim strFile As String 'file name found in Dir()
Dim strDT as String *'hold the date/time of the dest file
Dim intPos As Integer

'what folder do you want to search and process?
strFolder = "C:\Test\"
strDestFolder = "C:\CopyFilesTo \"

'see if there's any files in the search folder
strFile = Dir(strFolder & "*.*")

'process files in folder until complete
Do while strFile ""
* *'there's a file
* *strSourceFile = strFolder & strFile

* *'....process the source file

* *'format the date/time to a string value. *A filename can't have
* *'a colon in it so time is separated with dashes as well
* *strDt = format(now(),"m m-dd-yyyy hh-nn-ss")

* *'create the destination file name to copy the source file to. *Find
* *'out where the filename's extension begins. *Assumes there is an_
* *'extension. *Ex: *C:\Test\Test.T xt, might become
* *'C:\CopyFilesT o\Test 11-08-2008 11-30-01.Txt" *(11-30-01)is the time.
* *intPos = Instr(strFile," .")
* *strDestFile = strDestFolder & strFile & " " & *strDt & _
* * *Mid(strFile,in tPos)

* *'now copy the file to the new destination * * * * * *
* *FileCopy strSourceFile, strDestFile

* *'now delete the source file
* *Kill strSourceFile

* *'now get the next file that exists in the folder
* *strFile = Dir()
Loop

'for testing purpose
msgbox "Done processing"

'reset/restart the timer interval
Me.TimerInterva l = 60000
End Sub- Hide quoted text -

- Show quoted text -
Thanks, Salad - And Phil and Tony.
I worked with my friend using bits and pieces of all this and he
thinks he's got it working. MUCH appreciated!

Until next time -
Sara
Nov 10 '08 #7
sara wrote:
On Nov 10, 11:41 am, Salad <o...@vinegar.c omwrote:
>>sara wrote:
>>>On Nov 9, 5:43 pm, "Phil Stanton" <p...@myfamilyn ame.co.ukwrote:
>>>>You might have a look at
>>>>http://allapi.mentalis.org/apilist/F...fication.shtml
>>>>Phil
>>>>"sara" <saraqp...@yaho o.comwrote in message
>>>>news:5a**** *************** *************** @h23g2000prf.go oglegroups.com. ..
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@teluspl anet.netwrote:
>>>>>sara <saraqp...@yaho o.comwrote:
>>>>>>I can't find code in searches or on the MVP and tool sites I visited -
>>though I might not understand that there is code that just needs
>>adaptatio n. ALL help is appreciated.
>>1) Open folder on server.
>>>>>>2) Are there any files in the folder, if no end
>>a. If yes, get first filename
>>>>>See the Dir command in VBA help.
>>>>>While highly unlikely if you are running Dir in a loop and call another
>subrouti ne
>which in turn uses Dir the second set of calls will wipe out the pointer
>of the first
>set of Dir calls.
>>>>>>b. Import filename to specified table *This doesn't make
>>sense to me, so I assume he wants the file imported but I will have to
>>check on that for more specifics.
>>>>>Rename in VBA cmd
>>>>>>c. Delete filename ** I think he wants to delete the file
>>>>>>from this folder, not the just the name, so the file won't be there
>>>>>>the next time the routine executes
>>>>>Kill
>>>>>>d. Get next filename, if none, end.
>>>>>Dir again but with an empty string.
>>>>>Tony
>--
>Tony Toews, Microsoft Access MVP
>Please respond only in the newsgroups so that others can
>read the entire thread of messages.
>Microsof t Access Links, Hints, Tips & Accounting Systems
>athttp://www.granite.ab. ca/accsmstr.htm
>Tony's Microsoft Access Blog -http://msmvps.com/blogs/access/
>>>>I've looked at this and have a few questions:
>>>>Why use Rename? That would put a file out there and it would be
"picked up" again in the next 60 seconds. Could he use
filename.de lete? I figure he'd have the filename, with the path,
which we could create as a variable in the code. Then could he say:
strFileName .delete? Or Kill strFileName? (Is Kill better? - I had
never heard of it)
>>>>Is the Timer function used to run a module every 60 seconds? I will
mention to him the risk with every 60 seconds, and perhaps he can go
to 5 minutes or something. I read one post that seemed to indicate we
should create a form that will always be open I guess it would have to
be hidden), Set the TimerInterval property to something like 60000
(check once every 60 seconds). Put this code (or call to the module)
in the OnTimer event procedure.
>>>>I think I understand DIR - it's a little hard for me because they way
I learn is to try and this isn't my app (I am even more impressed now
with how all you MVPs are so well able to offer help!).
>>>>Thanks for getting us started!
sara- Hide quoted text -
>>>>- Show quoted text -
>>>Hi Phil -
I looked at that, but I don't understand how it relates to what I'm
looking for. I do't really understand what an API is, or if that's
what is needed in this case, either. Sorry - I'm new to a lot of
this.
>>>Sara

Some of this might help you get started. In a form you have a timer
interval.

In the Form's property sheet the event OnTimer fires if there is a value
in TimerInterval. TimerInterval is input is in milliseconds. One
second is 1000. One minute is 60,000. Set the value to however long
you want the event to "pause" before firing.

In the OnTimer event you will want to check for files. This is some air
code. Assumes timerinterval is 60000.

Private Sub Form_Timer()
'stop the OnTimer event from starting again until processing is complete
Me.TimerInter nal = 0

Dim strFolder As String
Dim strSourceFile 'file path & name
Dim strDestFile As String 'file path & name to be copied to
Dim strDestFolder As String
Dim strFile As String 'file name found in Dir()
Dim strDT as String 'hold the date/time of the dest file
Dim intPos As Integer

'what folder do you want to search and process?
strFolder = "C:\Test\"
strDestFold er = "C:\CopyFilesTo \"

'see if there's any files in the search folder
strFile = Dir(strFolder & "*.*")

'process files in folder until complete
Do while strFile ""
'there's a file
strSourceFile = strFolder & strFile

'....process the source file

'format the date/time to a string value. A filename can't have
'a colon in it so time is separated with dashes as well
strDt = format(now(),"m m-dd-yyyy hh-nn-ss")

'create the destination file name to copy the source file to. Find
'out where the filename's extension begins. Assumes there is an _
'extension. Ex: C:\Test\Test.Tx t, might become
'C:\CopyFilesTo \Test 11-08-2008 11-30-01.Txt" (11-30-01)is the time.
intPos = Instr(strFile," .")
strDestFile = strDestFolder & strFile & " " & strDt & _
Mid(strFile,int Pos)

'now copy the file to the new destination
FileCopy strSourceFile, strDestFile

'now delete the source file
Kill strSourceFile

'now get the next file that exists in the folder
strFile = Dir()
Loop

'for testing purpose
msgbox "Done processing"

'reset/restart the timer interval
Me.TimerInter val = 60000
End Sub- Hide quoted text -

- Show quoted text -


Thanks, Salad - And Phil and Tony.
I worked with my friend using bits and pieces of all this and he
thinks he's got it working. MUCH appreciated!

Until next time -
Sara
You are welcome.

I supplied aircode. I had the line
strDestFile = strDestFolder & strFile & " " & strDt & _
Mid(strFile,int Pos)
but strFile contains an extension so it should be
strDestFile = strDestFolder & left(strFile,in tPos-1) & " " & _
strDt & Mid(strFile,int Pos)

Hopefully you or your friend caught it.
Nov 10 '08 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
2595
by: kaiwing18 | last post by:
Hi , I have a problem relate to java and database. Could anyone answer me ?Please see the following code. import java.sql.*; public class Result { public static void main(String args) {
0
1670
by: Farooq Khan | last post by:
hi, my development team has been assigned a project that involves writing our own Web service. i happen to be a C++ programmer, new to C#/ASP.net. i dont know where to begin with......any article/book/link or anything that can help me start coding/getting those concepts, will be appreciated. Thanx, Farooq Khan
2
301
by: Pavel Novotny | last post by:
H I'm trying to import a | seperated text from string variable which represents a tabl with several fields, eg 6124079|PRIRUBA 11 DN250 PN6;CSN131160.0;11369.1;CSN131005.50|KS|11,100000|3437, 6124080|PRIRUBA 11 DN200 PN6;CSN131160.0;11369.1;CSN131005.50|KS|8,870000|2761, I dont know how convert it to dataset or XML... Is there any function in .NEt or must I implement myself
0
1310
by: arunavlp | last post by:
hi, I am new to .net , i am using VB.Net (Web form). I dont know how to pass parameters to stored function. Regards, Arun.S
2
2706
by: hojjatnikan | last post by:
please help me this code 62EH&5gx0wiqoQFw is this name ( Belux) but i dont know how convert it i dont know the algorithm of this code plead help me
2
2488
by: Tiruak | last post by:
Hi there. Thanks in advance for the people reading and trying to help. I'm very begginer using flash and action script, and I tryed to do this one navigation menu. Since I dont have experience doing this, I did things in a way I thought it should work, to create the onmouseover animation of the buttons of my navigation menu. After a couple days working on it, I managed it to work almost the way I wanted it to, with 2 exceptions that I...
2
4341
by: mika_ella258 | last post by:
the output should be like this Loop Program -------------------- enter 1st integer: enter 2nd integer: enter 3rd integer: enter 4th integer: enter 5th integer:
2
5584
by: Sreenivas | last post by:
I dont know how to compile cpp programs with gcc as i am new to gcc and cpp. could anybody help me out? Thanks&Regards, Srinivas Reddy Thatiparthy.
2
2048
by: sailormoon | last post by:
this information i put in data.txt 11221 MOHD IRFAN 80 70 11222 NURUL FITRAH 80 90 11223 MOHD FARHAN 70 80 11224 WAFFIN WARDAH 80 60 11225 SYAMSUL 50 50 99999 TAMAT 0 0 #include<fstream.h>
0
8202
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8707
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8641
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8366
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8510
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7199
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5575
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4093
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4202
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.