S
Shawn C
Hi,
I have a need to import new csv files from a directory into my databse, and
then rename the files so that they do not get re-imported. I also want to
include the date created of each file as a field in my table. I have the
following which imports the files:
Dim strFolder As String
Dim strFile As String
strFolder = "\\pbdsftpnp.main.pbd.com\PBDSFTPNP\hasbro\"
strFile = Dir(strFolder & "*.csv")
Do While Len(strFile) > 0
DoCmd.TransferText acImportDelim, "FileImportSpecs", "FileImport", strFolder
& strFile, True
strFile = Dir()
Loop
But I don't know how to rename the files, and where to place this command in
the dode, and I don't know how to inlude the date created (of each csv file)
as a field within the record.
Any help will be greatly appreciated!
I have a need to import new csv files from a directory into my databse, and
then rename the files so that they do not get re-imported. I also want to
include the date created of each file as a field in my table. I have the
following which imports the files:
Dim strFolder As String
Dim strFile As String
strFolder = "\\pbdsftpnp.main.pbd.com\PBDSFTPNP\hasbro\"
strFile = Dir(strFolder & "*.csv")
Do While Len(strFile) > 0
DoCmd.TransferText acImportDelim, "FileImportSpecs", "FileImport", strFolder
& strFile, True
strFile = Dir()
Loop
But I don't know how to rename the files, and where to place this command in
the dode, and I don't know how to inlude the date created (of each csv file)
as a field within the record.
Any help will be greatly appreciated!