x

Error when trying to Rename a file using file system task.

ssis flat file destination connection manager has invalid usage type folder exists.

I am using a variable with source location. I have a flat file connection connection string references \snap3\share1\uploads\xxx\Archive and expressions is @[User::Dest_Dir] +RIGHT("0" + (DT_STR,4,1252) DatePart("yyyy",getdate()),4)+ Right("0" + (DT_STR,4,1252) DatePart("m",getdate()),2) + Right("0" + (DT_STR,4,1252) DatePart("d",getdate()),2) + ".txt"

the flat file connection is usage type existing folder the folder is \snap3\share1\uploads\Autonation\Archive

Now of course the folder exists it is supposed to.

I have no idea how to fix this and i just want to rename the file with a date so i can close this task. It is the last piece. Does anyone have any idea.
more ▼

asked Apr 18 at 08:26 PM in Default

artistlover gravatar image

artistlover
616 21 48 53

This site works by voting. Please indicate all helpful answers by clicking on the thumbs up next to those answers. If any one answer lead to a solution, please indicate this by clicking on the check mark next to that answer.
Apr 22 at 10:05 AM Grant Fritchey ♦♦
(comments are locked)
10|1200 characters needed characters left

2 answers: sort voted first

Hi Artistlover,

The flat file connection you gave has its connection string referencing

\snap3\share1\uploads\xxx\Archive

Whereas the folder that you guarantee to exist is the folder

\snap3\share1\uploads\Autonation\Archive
Both are different paths! This could be the source of error.
more ▼

answered Apr 21 at 07:08 AM

nidheesh.r.pillai gravatar image

nidheesh.r.pillai
1.6k 6 13 20

(comments are locked)
10|1200 characters needed characters left

Maybe the "\" is misssing between "Dest_Dir" and Filename.

SSIS wants backslash doubled "\\" in editors
more ▼

answered Apr 21 at 11:24 AM

west007 gravatar image

west007
141 2

(comments are locked)
10|1200 characters needed characters left
Your answer
toggle preview:

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

New code box

There's a new way to format code on the site - the red speech bubble logo will automatically format T-SQL for you. The original code box is still there for XML, etc. More details here.

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

SQL Server Central

Need long-form SQL discussion? SQLserverCentral.com is the place.

Topics:

x937

asked: Apr 18 at 08:26 PM

Seen: 285 times

Last Updated: Apr 22 at 10:05 AM