Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
Business Intelligence
»
ForEach Loop to delete all files in folder.
ForEach Loop to delete all files in folder.
Rate Topic
Display Mode
Topic Options
Author
Message
CptCrusty1
CptCrusty1
Posted Thursday, October 18, 2012 3:38 PM
SSC-Enthusiastic
Group: General Forum Members
Last Login: Wednesday, May 01, 2013 1:17 PM
Points: 158,
Visits: 252
Hi...
I went to the following URL:
http://consultingblogs.emc.com/jamiethomson/archive/2008/04/17/ssis-deleting-a-group-of-files.aspx
for some help on how to configure a For each loop to delete all the txt files in a folder. I did everything it said (I think) and the annoying little red X doesn't go away. It says : Variable "USER::DeleteFileName" is used as a source or destination and is Empty:
Obviously, I've missed something. I created the Variable in the ForEach Loop and was able to find it in the File System Task Editor. I've pointed the ForEach Loop Container to the folder in question and give a file mask of *.txt. Not sure what else I'm missing.
Any hints would be great.
Thanks
Crusty.
Post #1374597
Vikash Kumar Singh
Vikash Kumar Singh
Posted Sunday, October 21, 2012 5:57 AM
Valued Member
Group: General Forum Members
Last Login: Thursday, May 16, 2013 7:07 PM
Points: 58,
Visits: 139
What is the data type and scope of the variable?
I would suggest you to check the value of the variable before applying File System task? What values are assigning into the variable?
Vikash Kumar Singh ||
www.singhvikash.in
Post #1375163
Koen Verbeeck
Koen Verbeeck
Posted Monday, October 22, 2012 1:20 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Today @ 7:39 AM
Points: 9,370,
Visits: 6,467
My guess is the variable DeleteFileName is currently empty and the File System Task can't handle that.
Try giving the variable a dummy value and see if that helps.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1375281
subbareddy542
subbareddy542
Posted Tuesday, October 23, 2012 12:37 AM
SSC Eights!
Group: General Forum Members
Last Login: Today @ 4:17 AM
Points: 832,
Visits: 613
pls give any dummy value to that variable..
it is not pass that value to to file system task..
for validation purpose only........
Post #1375850
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.