I would like to copy a file from one directory to another and would like to accomplish this within a stored procedure.
There are a couple of issues that have be questioning the best method to accomplish this:
1. I will not know the exact name of the file but will know the naming convention it will follow. The naming convention includes the date (mmddyy) along with some variable text. EXAMPLE: 082106_test1.txt
2. Upon copying this file to the new directory, I want to rename the new file.
Is the xcopy command the best method for doing this? Can a wildcard (*) be used to identify the source file?
If so, could anyone provide an example of the correct syntax given the example above?
Any help is greatly appreciated.
Thank you very much in advance.
There are a couple of issues that have be questioning the best method to accomplish this:
1. I will not know the exact name of the file but will know the naming convention it will follow. The naming convention includes the date (mmddyy) along with some variable text. EXAMPLE: 082106_test1.txt
2. Upon copying this file to the new directory, I want to rename the new file.
Is the xcopy command the best method for doing this? Can a wildcard (*) be used to identify the source file?
If so, could anyone provide an example of the correct syntax given the example above?
Any help is greatly appreciated.
Thank you very much in advance.