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

 All Forums
 SQL Server 2005 Forums
 SSIS and Import/Export (2005)
 delete some files in ssis

Author  Topic 

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-11-05 : 01:50:31
i have diffrent type of files in my local (c:\mypath)
how can i delete all of them?
(aa.txt,cc.jpg,bb.xls..and more)

thanks

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-11-05 : 02:06:55
del c:\mypath\*.*

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-11-05 : 02:47:10
which control(component) i need to choose?

quote:
Originally posted by tkizer

del c:\mypath\*.*

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."

Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-11-05 : 04:43:51
Use File System Task, and the "Delete directory content" operation.
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-11-05 : 05:36:59
i have some folders in this path , and i want just delete the files except folders
Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-11-05 : 05:53:23
Ok, then use the Execute Process task, with the executable being del c:\mypath\*.*, as above.
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-11-05 : 06:22:07
it is exactly what i need , but it is'nt working, i get this error:

Error 1 Validation error. Execute Process Task Execute Process Task: File/Process "*.*" does not exist in directory
"del\MyserverName\". File.dtsx 0 0



Go to Top of Page

YellowBug
Aged Yak Warrior

616 Posts

Posted - 2009-11-05 : 06:30:54
Try: del \\MyserverName\ShareName\*.*

Do you have any spaces in the share name?
Go to Top of Page

inbs
Aged Yak Warrior

860 Posts

Posted - 2009-11-05 : 07:08:25
no i havent any spaces
i check it again ,and it is still not work
i create a batch file,i write the same path and run it as a file.bat and it is work (but i dont work with a file)


quote:
Originally posted by YellowBug

Try: del \\MyserverName\ShareName\*.*

Do you have any spaces in the share name?

Go to Top of Page
   

- Advertisement -