Is this possible?? I am doing this with a 3rd party macro right now, but would like it in VBA so I can run it directly from access prior to my queries. Basically what the query below does is look at the source path for a filename that has the current date in it, and if it's todays date, it copies and renames it to the destination path. Is there a VBA God on here somewhere that can help me translate into VBA, which is not my area of expertise?????
Let>SourcePath=S:\CTV
Let>DestPath=\\MINT02\Share\SHARE\SMP\DialerRecon
Let>CF_OVERWRITE=1
Month>MM
Day>DD
Year>YYYY
MidStr>%YYYY%,3,2,YY
Let>FileName=%MM%%DD%%YY%pool55inv.txt
Let>NewFileName=pool55inv.txt
IfFileExists>%SourcePath%\%FileName%,CopyIt
MessageModal>File %Filename% was NOT found in %SourcePath%%CRLF%CRLF%No file copied. Process Stopped.
Goto>End
Label>CopyIt
CopyFile>%SourcePath%\%FileName%,%DestPath%\%NewFileName%
MessageModal>File %Filename% was found in %SourcePath%.%CRLF%%CRLF%. File was copied to %DestPath%.
IfFileExists>%DestPath%\%NewFileName%,Success,Fail
Label>Success
MessageModal>File Found
Goto>End
Label>Fail
MessageModal>File Not Found
Goto>End
Label>End
I appreciate any help!!
Shawn.
Let>SourcePath=S:\CTV
Let>DestPath=\\MINT02\Share\SHARE\SMP\DialerRecon
Let>CF_OVERWRITE=1
Month>MM
Day>DD
Year>YYYY
MidStr>%YYYY%,3,2,YY
Let>FileName=%MM%%DD%%YY%pool55inv.txt
Let>NewFileName=pool55inv.txt
IfFileExists>%SourcePath%\%FileName%,CopyIt
MessageModal>File %Filename% was NOT found in %SourcePath%%CRLF%CRLF%No file copied. Process Stopped.
Goto>End
Label>CopyIt
CopyFile>%SourcePath%\%FileName%,%DestPath%\%NewFileName%
MessageModal>File %Filename% was found in %SourcePath%.%CRLF%%CRLF%. File was copied to %DestPath%.
IfFileExists>%DestPath%\%NewFileName%,Success,Fail
Label>Success
MessageModal>File Found
Goto>End
Label>Fail
MessageModal>File Not Found
Goto>End
Label>End
I appreciate any help!!
Shawn.