Click here to Skip to main content
15,922,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Shred a folder Pin
Richard MacCutchan27-Nov-12 4:28
mveRichard MacCutchan27-Nov-12 4:28 
GeneralRe: Shred a folder Pin
MehdiHazrati27-Nov-12 4:50
MehdiHazrati27-Nov-12 4:50 
GeneralRe: Shred a folder Pin
Richard MacCutchan27-Nov-12 5:05
mveRichard MacCutchan27-Nov-12 5:05 
GeneralRe: Shred a folder Pin
MehdiHazrati27-Nov-12 5:23
MehdiHazrati27-Nov-12 5:23 
QuestionRe: Shred a folder Pin
David Crow27-Nov-12 6:04
David Crow27-Nov-12 6:04 
GeneralRe: Shred a folder Pin
Richard MacCutchan27-Nov-12 6:29
mveRichard MacCutchan27-Nov-12 6:29 
QuestionRe: Shred a folder Pin
David Crow27-Nov-12 6:03
David Crow27-Nov-12 6:03 
AnswerRe: Shred a folder Pin
jschell27-Nov-12 13:08
jschell27-Nov-12 13:08 
From the other responses presumably the following is what you want to do.
1. You want to shred files.
2. You want to shred file information in the directory itself.

For 1 you iterate over files in the directory and recurse through each sub directory and shred each file. You MUST do this. There is no magic solution that would allow you to do it in some other way.

For 2 it is more complex and depends on what you want you think a 'shred' would do. At a minor level you can just rename each file before shredding it. That overwrites the name. For a real shred you would need to
1. Create an API to access the file system at a raw level
2. Parse the file block
3. Shred the relevant file info that was found by step 1. In this case 'shred' includes the same basic methodology employed to shred a file but on a very small scale. You would need to write the shred code yourself.

Note that if you choose to implement the solution above then you MUST back up your hard drive because when you mess up the code you will need to reformat the hard drive. You must also extensively test this feature as well for the same reason. Also account for different file system types (like ssd and usb.)
GeneralRe: Shred a folder Pin
MehdiHazrati27-Nov-12 17:45
MehdiHazrati27-Nov-12 17:45 
GeneralRe: Shred a folder Pin
jschell28-Nov-12 8:33
jschell28-Nov-12 8:33 
Questiondo-while did not work Pin
ho_khalaf26-Nov-12 19:36
ho_khalaf26-Nov-12 19:36 
AnswerRe: do-while did not work Pin
Andy41126-Nov-12 19:55
Andy41126-Nov-12 19:55 
GeneralRe: do-while did not work Pin
ho_khalaf26-Nov-12 20:04
ho_khalaf26-Nov-12 20:04 
GeneralRe: do-while did not work Pin
Andy41126-Nov-12 20:08
Andy41126-Nov-12 20:08 
AnswerRe: do-while did not work Pin
water-moon201226-Nov-12 20:20
water-moon201226-Nov-12 20:20 
Questioneclipse Pin
ho_khalaf26-Nov-12 8:02
ho_khalaf26-Nov-12 8:02 
QuestionRe: eclipse Pin
Maximilien26-Nov-12 8:04
Maximilien26-Nov-12 8:04 
AnswerRe: eclipse Pin
ho_khalaf26-Nov-12 8:08
ho_khalaf26-Nov-12 8:08 
AnswerRe: eclipse Pin
Richard MacCutchan26-Nov-12 8:15
mveRichard MacCutchan26-Nov-12 8:15 
Questiondo-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 6:50
ho_khalaf26-Nov-12 6:50 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
Chris Meech26-Nov-12 7:07
Chris Meech26-Nov-12 7:07 
AnswerRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 8:00
mveRichard MacCutchan26-Nov-12 8:00 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 8:12
ho_khalaf26-Nov-12 8:12 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
Richard MacCutchan26-Nov-12 8:14
mveRichard MacCutchan26-Nov-12 8:14 
GeneralRe: do-while did not work in eclipse c\c++ IDE ? Pin
ho_khalaf26-Nov-12 8:16
ho_khalaf26-Nov-12 8:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.