Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 .NET Inside SQL Server (2005) need help in file path
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Starting Member

32 Posts

Posted - 11/28/2011 :  05:32:14  Show Profile  Reply with Quote
Dim filename As String = "C:\Documents and Settings\Desktop\ALLFILES\NAME_" & Date.Today.ToString("yyyy_MM") & "\INC_" & Date.Today.ToString("yyyy_MM") & ".xls"

when i am using the same path in script is throwing error..

Can u pls provide how to handle this.

here folder name is also dynamic which wil create using file system task,,to the same folder this file has to create with current date

Thanks in advance.

Very Important crosS Applying yaK Herder

52326 Posts

Posted - 11/28/2011 :  07:25:30  Show Profile  Reply with Quote
folder name and all others which are dynamic can be stored in variables created inside package. then for filename set another variable with EvaluateAsExpression property true and set the expression like

@[User::FolderName] + @[System::StartTime] + "\\INC_" + @[System::StartTime] + ".xls"

and no need of separate script task to set it
SQL Server MVP

Edited by - visakh16 on 11/28/2011 07:25:56
Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000