Showing posts with label directory. Show all posts
Showing posts with label directory. Show all posts

Thursday, March 29, 2012

DTS FTP Task: Is it possible to get beyond the root directory of the ftp site

Hi, I have the following problem
I am trying to download files from a ftp site using FTP task in DTS. The files reside in a subfolder of the root directory but I don't see a way to get there. Any ideas how to go around this?
ThanksI don't know what version of SQL server you are using, but in 2000 the FTP task allows you to specify the directory to retrieve the file from. After you enter the id and password you can go to the 'Files' tab and navigate through the directory structure.

Friday, March 9, 2012

DTS ActiveX BCP file manipulation

Does anyone know the best way to handle this type of situation?

A file coming into a directory based on the date filename042707
I use the fileexist stored procedure to check for the existence.
I use xp_cmdshell(sp)... stored procedure to rename the file so that
it just has filename instead of the date... I can not use
variables within the xp_cmdshell to replace the date...
everyday the filename would change to filename042807,filename042907 etc...

Basically I know how to copy the file to another directory if it exists...
then I want to strip the right 8 characters off... rename just to that
but with the rename i have to know what the file will be named for that day ...
excuse the grammar just somewhat tired...
any suggestions... please thanks time for sleep"DTS ActiveX BCP file manipulation"

what on earth are you doing with ActiveX in SQL Server?|||not sure where r u facing problem

I can not use variables within the xp_cmdshell to replace the date...

u can use variables withing xp_cmdshell like below

declare @.cmd varchar(100)
set @.cmd = 'ren d:\file042807.xls file' + replace(convert(varchar ,getdate(),1),'/','') + '.xls'
exec master..xp_cmdshell @.cmd

what on earth are you doing with ActiveX in SQL Server?

talking about ActiveX of DTS...

Wednesday, March 7, 2012

DTS - The directory name is invalid

I am trying to save a dts package that I modified to sql server and am getting the following error:

"The directory name is invalid"

I've also tried saving it as a structured storage file and get the same error!

I've been working with dts packages for years and I've never gotten this error.

Can anyone help?

Pete

Try the DTS group: http://groups.google.com/group/microsoft.public.sqlserver.dts?lnk=sg