Reputation: 727
I have a package I created that runs fine in Visual studio.
The package uses a for each file loop and the variable points to a folder like this:
C:\Users\Desktop\Folder\
However, once I deploy the package on SSMS, when I execute the package I get the following error:
Foreach File in Folder:Warning: The For Each File enumerator is empty. The For Each File enumerator did not find any files that matched the file pattern, or the specified directory was empty
Why do I get this warning in SSMS, but in VS it runs fine?
Note: The SQL Server is not hosted on my local machine.
Upvotes: 1
Views: 9188
Reputation: 31785
If you use a local path to the folder, like this
C:\Users\Desktop\Folder\
Then when you run the package on the SQL Server, the files need to be in that LOCAL PATH on the SQL Server.
When you run it in Visual Studio, it looks for the files in the local path on your machine.
Upvotes: 4