Community discussion forum

deleting 50,000 file at a time in C#

  • 9 months ago
    Hi All, I am new this community. i have a small query. i have 60,000 files in my folder. i want to delete 50,000 files among them at a single stretch using .net (any language C#/ASP/VB). i don't want to delete the whole folder. apart from using "for each" in .net could any one tell me the best way to do it.
    Post was edited on 05/02/2009 17:32:16 Report abuse
  • 9 months ago
    Hi sir ! i have a bit ideas but good or not i am not sure the best way is save your filename as Ex: file.00001.txt ,file.00002.txt,file.60000.txt dim i as int32=0 for each filename in folders i=i+1 file.delete "\Folders\ " & "file." & format(i,"00000") & ".txt" next i have more ideas about that but try this first any problems post it again thanks from Nimol Men

Post a reply

Enter your message below

Sign in or Join us (it's free).

Want to stay in touch with what's going on? Follow us on twitter!