Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Delete files older than 7 days from a "Network shared folder" Expand / Collapse
Author
Message
Posted Friday, September 6, 2013 4:42 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, December 15, 2014 10:57 PM
Points: 517, Visits: 646
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.
Post #1492154
Posted Friday, September 6, 2013 5:02 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 12:52 PM
Points: 13,636, Visits: 11,509
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1492159
Posted Friday, September 6, 2013 5:19 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Monday, December 15, 2014 10:57 PM
Points: 517, Visits: 646
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.

Post #1492165
Posted Friday, September 6, 2013 6:22 AM


SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Friday, December 12, 2014 12:19 AM
Points: 647, Visits: 1,311
you can use fileinfo in C#

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


-- Roshan Joe
*******************************************
There are two types of DBAs. Those who has skills and those who have permissions
Jeff Moden -Forum Etiquette: How to post data/code on a forum to get the best help
Custom cleanup script for backups
Post #1492188
Posted Friday, September 6, 2013 6:43 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 12:52 PM
Points: 13,636, Visits: 11,509
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?

Member of LinkedIn. My blog at LessThanDot.

MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1492196
Posted Sunday, September 8, 2013 4:50 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 2:15 AM
Points: 5,317, Visits: 12,354
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.

When you ask a question (and please do ask a question: "My T-SQL does not work" just doesn't cut it), please provide enough information for us to understand its context.

It is better to keep your mouth shut and appear stupid than to open it and remove all doubt. (Mark Twain)
Post #1492588
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse