467,880 Members | 1,246 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,880 developers. It's quick & easy.

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
  • viewed: 1571
Share:
7 Replies
sara <sa*******@yahoo.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...@telusplanet.netwrote:
sara <saraqp...@yahoo.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.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
Nov 9 '08 #3
You might have a look at

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

Phil

"sara" <sa*******@yahoo.comwrote in message
news:5a**********************************@h23g2000 prf.googlegroups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:
sara <saraqp...@yahoo.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.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

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

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

Phil

"sara" <saraqp...@yahoo.comwrote in message

news:5a**********************************@h23g2000 prf.googlegroups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:


sara <saraqp...@yahoo.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.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
Nov 10 '08 #5
sara wrote:
On Nov 9, 5:43 pm, "Phil Stanton" <p...@myfamilyname.co.ukwrote:
>>You might have a look at

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

Phil

"sara" <saraqp...@yahoo.comwrote in message

news:5a**********************************@h23g20 00prf.googlegroups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:

>>>sara <saraqp...@yahoo.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.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.TimerInternal = 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(),"mm-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.Txt, 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,intPos)

'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.TimerInterval = 60000
End Sub
Nov 10 '08 #6
On Nov 10, 11:41*am, Salad <o...@vinegar.comwrote:
sara wrote:
On Nov 9, 5:43 pm, "Phil Stanton" <p...@myfamilyname.co.ukwrote:
>You might have a look at
>http://allapi.mentalis.org/apilist/F...fication.shtml
>Phil
>"sara" <saraqp...@yahoo.comwrote in message
>news:5a**********************************@h23g200 0prf.googlegroups.com....
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:
>>sara <saraqp...@yahoo.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.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.TimerInternal = 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(),"mm-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.Txt, 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,intPos)

* *'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.TimerInterval = 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.comwrote:
>>sara wrote:
>>>On Nov 9, 5:43 pm, "Phil Stanton" <p...@myfamilyname.co.ukwrote:
>>>>You might have a look at
>>>>http://allapi.mentalis.org/apilist/F...fication.shtml
>>>>Phil
>>>>"sara" <saraqp...@yahoo.comwrote in message
>>>>news:5a**********************************@h23g 2000prf.googlegroups.com...
On Nov 9, 3:01 pm, "Tony Toews [MVP]" <tto...@telusplanet.netwrote:
>>>>>sara <saraqp...@yahoo.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.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.TimerInternal = 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(),"mm-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.Txt, 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,intPos)

'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.TimerInterval = 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,intPos)
but strFile contains an extension so it should be
strDestFile = strDestFolder & left(strFile,intPos-1) & " " & _
strDt & Mid(strFile,intPos)

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

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Pavel Novotny | last post: by
2 posts views Thread by Sreenivas | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.