January 22, 2015 at 1:22 pm
I am in need of a job step to move all files with a .dat extension to another folder.
Source Folder: C:\Temp\Ack
Destination Folder C:\Temp\Reports
Files to move: *.dat
I need to be able to call this from a SQL Job (SQL 2005). I attempted to use a File System Task to move the files, but it seems with this method, you need to specify file names. I thought of powershell, but due to this being SQL 2005 calling a power shell script from a SQL job is not feasible.
Can anyone please recommend a method?
Thanks!!!
January 22, 2015 at 1:41 pm
A CMDEXEC job step should be able to run the command "MOVE C:\Temp\Ack\*.dat C:\Temp\Reports".
If you want to use the File System Task in an SSIS package to move the files, put it in a ForEach File container. The container can look for the files and put the full name in a variable, then the File System Task can use that variable as the source file.
January 22, 2015 at 1:43 pm
Thanks Scott!!! I just figured that out and came back here to reply that I have answered my own question.
Thanks for the help!!
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy