I have a stored procedue that BCP's data into a table from a file called ImportData.txt in a directory C:\ImportData.
So prior to the BCP in, the file looks like this:
What I'd like to do is change the name of the file to include the date and time, and move it to a subdirectory. This way I know which file was BCP'ed, and don't have to think about whether I have the right file next time I import.
So after, it should look like this:
I think there is a way to do this using a stored procedure. Any help would be appreciated. Thanks!