Go Back   AnandTech Forums > Software > Programming

Forums
· Hardware and Technology
· CPUs and Overclocking
· Motherboards
· Video Cards and Graphics
· Memory and Storage
· Power Supplies
· Cases & Cooling
· SFF, Notebooks, Pre-Built/Barebones PCs
· Networking
· Peripherals
· General Hardware
· Highly Technical
· Computer Help
· Home Theater PCs
· Consumer Electronics
· Digital and Video Cameras
· Mobile Devices & Gadgets
· Audio/Video & Home Theater
· Software
· Software for Windows
· All Things Apple
· *nix Software
· Operating Systems
· Programming
· PC Gaming
· Console Gaming
· Distributed Computing
· Security
· Social
· Off Topic
· Politics and News
· Discussion Club
· Love and Relationships
· The Garage
· Health and Fitness
· Merchandise and Shopping
· For Sale/Trade
· Hot Deals with Free Stuff/Contests
· Black Friday 2014
· Forum Issues
· Technical Forum Issues
· Personal Forum Issues
· Suggestion Box
· Moderator Resources
· Moderator Discussions
   

Reply
 
Thread Tools
Old 01-24-2013, 06:50 AM   #26
Charles Kozierok
Elite Member
 
Join Date: May 2012
Posts: 6,762
Default

No real way to judge until we see the list or otherwise know what we're dealing with...
__________________
"Of those who say nothing, few are silent." -- Thomas Neill
Charles Kozierok is offline   Reply With Quote
Old 01-24-2013, 10:07 AM   #27
Homerboy
Lifer
 
Homerboy's Avatar
 
Join Date: Mar 2000
Location: MKE, WI
Posts: 19,622
Default

Quote:
Originally Posted by degibson View Post
How many files are you keeping? Maybe it'd be simpler to copy out all the files you're keeping then del the entire remaining directory?
We will be keeping way more than deleting.
__________________
"Ah... In a time of such ugliness, the only true protest is to be beautiful." - Refused
Homerboy is offline   Reply With Quote
Old 01-24-2013, 12:55 PM   #28
imagoon
Diamond Member
 
imagoon's Avatar
 
Join Date: Feb 2003
Location: Chicagoland, IL
Posts: 4,787
Default

Dump the paths from SQL to a csv:
Powershell:

Code:
Import-CSV "C:\temp.csv" | % { 
$path = $_.csvcolumnname
Remove-item "$path"
}
"csvcolumnname" is whatever you name the column in row 1

If you are working at the directory levels you could wildcard the paths as needed. A couple of examples of data sql is returning might help me give you a better solution.

Last edited by imagoon; 01-24-2013 at 01:10 PM.
imagoon is offline   Reply With Quote
Old 01-27-2013, 10:40 PM   #29
power_hour
Senior Member
 
power_hour's Avatar
 
Join Date: Oct 2010
Location: nowhere important
Posts: 789
Default

Do this all the time using vbscript. We do it based on historical values of timestamps; deleting files older than a specific date.

In a nutshell, just write the code in vbscript, save it and run it using a schedule task. Its ridiculously easy to do. Google for the script as its out there. And yeah you can do it a few ways too using Powershell or windows commands in a batch file or even Windows explorer search.
power_hour is offline   Reply With Quote
Old 02-01-2013, 03:08 PM   #30
Homerboy
Lifer
 
Homerboy's Avatar
 
Join Date: Mar 2000
Location: MKE, WI
Posts: 19,622
Default

Initial count of first batch is 461,479. They tightened the purge parameters some, so the "millions" has been reduced. That being said. the 461,479 is only the # of scans. Each scan could contain 1-## actual .tif files. I'm using a wild card on each of the 461,479 so while its 461,479 rows of "del", it could end up being millions of actual *.tif files that get nuked still.
__________________
"Ah... In a time of such ugliness, the only true protest is to be beautiful." - Refused
Homerboy is offline   Reply With Quote
Old 02-01-2013, 03:15 PM   #31
Charles Kozierok
Elite Member
 
Join Date: May 2012
Posts: 6,762
Default

That's no biggie.
__________________
"Of those who say nothing, few are silent." -- Thomas Neill
Charles Kozierok is offline   Reply With Quote
Old 02-01-2013, 04:27 PM   #32
Homerboy
Lifer
 
Homerboy's Avatar
 
Join Date: Mar 2000
Location: MKE, WI
Posts: 19,622
Default

Quote:
Originally Posted by CharlesKozierok View Post
That's no biggie.
No. not as horrific as it initially was planned to be. But they adjusted their purging rules so it would have been millions otherwise. Still is a hefty delete, and I'll be nervous as I double click the .bat file
__________________
"Ah... In a time of such ugliness, the only true protest is to be beautiful." - Refused
Homerboy is offline   Reply With Quote
Old 02-01-2013, 05:22 PM   #33
Charles Kozierok
Elite Member
 
Join Date: May 2012
Posts: 6,762
Default

Then you don't have adequate backups.

Offer remains if you need help when the time comes. Just drop me a line.
__________________
"Of those who say nothing, few are silent." -- Thomas Neill
Charles Kozierok is offline   Reply With Quote
Old 02-04-2013, 09:18 AM   #34
Homerboy
Lifer
 
Homerboy's Avatar
 
Join Date: Mar 2000
Location: MKE, WI
Posts: 19,622
Default

Quote:
Originally Posted by CharlesKozierok View Post
Then you don't have adequate backups.

Offer remains if you need help when the time comes. Just drop me a line.
I'm not in charge of backups. And those that are, I don't have the most faith in.
__________________
"Ah... In a time of such ugliness, the only true protest is to be beautiful." - Refused
Homerboy is offline   Reply With Quote
Old 02-04-2013, 09:27 AM   #35
Charles Kozierok
Elite Member
 
Join Date: May 2012
Posts: 6,762
Default

Well, you never run a delete script on a set of files without a backup, unless it is absolutely impossible.
__________________
"Of those who say nothing, few are silent." -- Thomas Neill
Charles Kozierok is offline   Reply With Quote
Old 02-04-2013, 09:37 AM   #36
Homerboy
Lifer
 
Homerboy's Avatar
 
Join Date: Mar 2000
Location: MKE, WI
Posts: 19,622
Default

If I'm told the backups are fine, then I am in the clear. If there is a F-up it is not in my scripts.
__________________
"Ah... In a time of such ugliness, the only true protest is to be beautiful." - Refused
Homerboy is offline   Reply With Quote
Old 02-16-2013, 04:10 PM   #37
Kyanzes
Golden Member
 
Kyanzes's Avatar
 
Join Date: Aug 2005
Location: Budapest, Hungary
Posts: 1,079
Default

Make sure you have a backup because even the slightest error in code could end in disaster. Any script/prg would require serious testing before allowing it to comb the folder structure.

Perhaps you should make the test program/script copy the files somewhere and only then delete them.

Later you can always delete the copies.
__________________
2500K + be quiet! Dark Rock Pro 2 Dual Tower | Asrock X79 Pro3 | 2x 4GB Corsair CMX8GX3M2A2000C9 @ 1866 | Gigabyte 7870 Factory-OC 1100MHz | ASUS Xonar + Sennheiser HD600 | X25-M 160GB MLC G2 + bunch of 2TB 7200 drives | PIONEER DVR-219L | CM 690 II Advanced | 500W Cooler Master (basic) | G18 keyboard | Razer DeathAdder V2 | Benq GW2750HM 27" AMVA
Kyanzes is offline   Reply With Quote
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -5. The time now is 05:27 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.