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, 2014 at 08:26 PM in Default

avatar image

artistlover
806 47 63 66

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, 2014 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, 2014 at 07:08 AM

avatar image

nidheesh.r.pillai
8.8k 17 56 46

(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, 2014 at 11:24 AM

avatar image

west007
141 2 3

(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.

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:

x1148

asked: Apr 18, 2014 at 08:26 PM

Seen: 4577 times

Last Updated: Apr 22, 2014 at 10:05 AM

Copyright 2016 Redgate Software. Privacy Policy