Take the 2-minute tour ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

I am currently working on a SSIS package that is to be triggered through CMD via VBA (Access). All that the package does is read a bunch of files from a folder and upload them into a table in SQL Server. The tricky part comes is that this folder location from which the package is to read the files is dynamic. Thnaks to STACKOVERFLOW, I figured out a way to make it dynamic, and the package is working good when executed from MS VS2008.

FUN PART : As the final link to complete the chain, I have used following in the cmd

dtexec \f "C:\Desktop\SSISAppend.dtsx" /Set "\Package.Variables[User::Directory].Property[Value];C:\Desktop\AppendFiles"

Throwing out an error : Code : 0x8001C004 Description: The For Each File Enumerator is empty. The For Each File enumerator did not find any files that meatched the file pattern, or the specified directory was empty.

I have used the following variables: "Directory" against DIRECTORY in COLLECTION>>EXPRESSIONS in the ForEachfile Enumerator, "FilePath" (With Index 0) in the Variable Mappings

When executed through MS VS2008, the package is running good with watever location mentioned against the variable DIRECTORY.

Appreciate all the help and do let me know if you need further info.

share|improve this question
    
Does the user running the package has sufficient right on that folder? –  Joost Jul 31 at 3:57
    
yes, the user has the read/write access to the folder, infact the package runs good when executed from SSIS (MS VS) directly, but the problem arises when trying to execute from CMD –  potluri Jul 31 at 13:32

1 Answer 1

Thinking on the same lines as @Joost comment with regards to permissions through Access/CMD.

Maybe you can try using RUNAS when starting CMD.

Using RUNAS command http://technet.microsoft.com/en-us/library/cc771525.aspx :

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.