July 11, 2009 at 12:16 am
I have a File System Task which uses a SourceVariable to set source files.
My SourceVariable was passed from previous steps and contains something like "C:\Temp\File01*.*".
I intend to move all files started with prefix "File01" to be moved to destination directory.
However, I got the following error:
[File System Task] Error: An error occurred with the following error message: "Illegal characters in path.".
It's complaining about the * in my path. However, I don't know the filenames beforehand. Is there anyway to get around it?
July 11, 2009 at 2:13 am
You could try a FOREACH container - put your File System Task in it and it should move all of the matching files one by one - after just a little bit of config.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 11, 2009 at 10:12 am
Thanks for the suggestion! Would you please elaborate a little more?
I couldn't figure out how to set the "Enumerator configuration" in the Foreach Loop (Foreach File Enumerator) container using variables. How can I pass my directory variable (C:\Temp) and File variable (File01*.*) to Folder and Files fields respectively?
July 11, 2009 at 11:11 am
Sure thing. Edit the Foreach container, click on Collection, select Expressions and set the Directory and Filespec properties to retrieve the contents of your variables.
The absence of evidence is not evidence of absence
- Martin Rees
The absence of consumable DDL, sample data and desired results is, however, evidence of the absence of my response
- Phil Parkin
July 11, 2009 at 11:33 pm
Got it. Thanks a lot, Phil!
Viewing 5 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic. Login to reply