I wanted to move a file from one location to another, in my SSIS package i have set the source in a file system task. I have created a variable called Path which is
C:\Users\VishalJethwa\Documents\Projects\Batch File SSIS Package Executer\
and a blank variable called Destination (which will be the folder name set in cmd) and finally a full path variable which concatenates both together to form the destination property in the file system task. I have tried the following to make it so the user inputs the folder name that they want to move the file to but it doesnt seem to work. I get the error
, this is the error messaeg Microsoft (R) SQL Server Execute Package Utility Version 10.50.1600.1 for 64-bit Copyright (C) Microsoft Corporation 2010. All rights reserved.
Started: 13:55:48 Error: 2014-02-04 13:55:48.81 Code: 0xC002F304 Source: Move File File System Task Description: An error occurred with the following error message: "Could not f ind file 'C:\Users\VishalJethwa\Documents\Projects\Batch File SSIS Package Execu ter\Source\Plank.txt'.". End Error Progress: 2014-02-04 13:55:48.81 Source: Move File Operation Complete: 100% complete End Progress Warning: 2014-02-04 13:55:48.81 Code: 0x80019002 Source: Move File Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allow ed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the e rrors. End Warning Warning: 2014-02-04 13:55:48.81 Code: 0x80019002 Source: BatchFileTest Description: SSIS Warning Code DTS_W_MAXIMUMERRORCOUNTREACHED. The Execution method succeeded, but the number of errors raised (1) reached the maximum allow ed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. Change the MaximumErrorCount or fix the e rrors. End Warning DTExec: The package execution returned DTSER_FAILURE (1). Started: 13:55:48 Finished: 13:55:48 Elapsed: 0.125 seconds '/SET' is not recognized as an internal or external command, operable program or batch file.
Below is the code in my batch file
@ECHO OFF
SET /p Loc = What folder do you wish to copy it to?:
DTEXEC /FILE "C:\Users\Admin\Documents\Projects\Batch File SSIS Package Executer\BatchFileTest\BatchFileTest\BatchFileTest.dtsx"
/SET "\package.Variables[User::Destination].Value";Loc
pause
Any ideas?