SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Delete files older than 7 days from a "Network shared folder"


Delete files older than 7 days from a "Network shared folder"

Author
Message
Mr. Kapsicum
Mr. Kapsicum
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1997 Visits: 1037
Hi all,

i know there are many solutions available for deleting files from a folder older than X days.\

But need a help to create a Script Task or Any other solution that can delete files from shared folder on a network shared drive.

Thanks in advance.
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: General Forum Members
Points: 62236 Visits: 13298
What problems are you running into?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Mr. Kapsicum
Mr. Kapsicum
SSCommitted
SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)SSCommitted (2K reputation)

Group: General Forum Members
Points: 1997 Visits: 1037
Koen Verbeeck (9/6/2013)
What problems are you running into?


Thanks for acknowledging my problem.

In a nutshell, i want a Script for my script task that delete all files from the Folder (which is a Shared folder in a network ) which are older than 7 days.
Roshan Jospeh
Roshan Jospeh
Hall of Fame
Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)Hall of Fame (3.1K reputation)

Group: General Forum Members
Points: 3123 Visits: 2093
you can use fileinfo in C#

Please see the below link.
http://www.dotnetperls.com/fileinfo

----------------------------------------------------------------------------------------------------------------------------------------------------
Roshan Joe

Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Koen Verbeeck
Koen Verbeeck
SSC Guru
SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)SSC Guru (62K reputation)

Group: General Forum Members
Points: 62236 Visits: 13298
Mr. Kapsicum (9/6/2013)
Koen Verbeeck (9/6/2013)
What problems are you running into?


Thanks for acknowledging my problem.

In a nutshell, i want a Script for my script task that delete all files from the Folder (which is a Shared folder in a network ) which are older than 7 days.



I know what you want to realize.
My question was what problems do you have when writing the script?


How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
My blog at SQLKover.

MCSE Business Intelligence - Microsoft Data Platform MVP
Phil Parkin
Phil Parkin
SSC Guru
SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)SSC Guru (51K reputation)

Group: General Forum Members
Points: 51368 Visits: 21156
Mr. Kapsicum (9/6/2013)
Koen Verbeeck (9/6/2013)
What problems are you running into?


Thanks for acknowledging my problem.

In a nutshell, i want a Script for my script task that delete all files from the Folder (which is a Shared folder in a network ) which are older than 7 days.



You're not asking any questions here. If you want help with something, please ask a question.

At the moment, I have been able to derive the fact that you would like some help with writing a script task.

I also know that you are aware that there are plenty of resources available on-line for such file-related tasks, but for some reason these are not good enough for you.


Help us to help you. For better, quicker and more-focused answers to your questions, consider following the advice in this link.

If the answer to your question can be found with a brief Google search, please perform the search yourself, rather than expecting one of the SSC members to do it for you.

Please surround any code or links you post with the appropriate IFCode formatting tags. It helps readability a lot.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search