Flag for DeleteFile() and DeleteDirectory() to trully erase
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Flag for DeleteFile() and DeleteDirectory() to trully erase
Since DeleteFile() and DeleteDirectory() functions do not delete file as it does when in windows is pushed SHIFT key and DELETE key at the same time, i.e. delete the file without move it to the trash; there would be interesting to add a flag for these functions to delete the file skipping the trash.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
No software installed.
May be a windows issue.
Just install a clean windows XP SP2 and then configure your trash to not move deleted files to it, but simply flush them.
Then the behaviour is exactly as explained above.
And these PB functions ( DeleteFile() and DeleteDirectory() ) act like above i explain. :roll:
BTW the Recycled file created is a hidden one with the standard windows trash icon.
May be a windows issue.
Just install a clean windows XP SP2 and then configure your trash to not move deleted files to it, but simply flush them.
Then the behaviour is exactly as explained above.
And these PB functions ( DeleteFile() and DeleteDirectory() ) act like above i explain. :roll:
BTW the Recycled file created is a hidden one with the standard windows trash icon.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Well, whatever it is must be local to your computer.
PB directly calls DeleteFile(), which does not move to the recycle bin. (see http://msdn.microsoft.com/en-us/library ... S.85).aspx )
> BTW the Recycled file created is a hidden one with the standard windows trash icon.
You probably have the file still open from another program, which causes the file to not be deleted until the file is closed.
(see link above)
PB directly calls DeleteFile(), which does not move to the recycle bin. (see http://msdn.microsoft.com/en-us/library ... S.85).aspx )
> BTW the Recycled file created is a hidden one with the standard windows trash icon.
You probably have the file still open from another program, which causes the file to not be deleted until the file is closed.
(see link above)
quidquid Latine dictum sit altum videtur
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
you just told it the other way round:Psychophanta wrote:Nope; what happens is what i said, i.e. PB functions work in a "without SHIFT" way by default.
you said that you reconfigured your trashbin to completely delete by default.
that means, moving to trashbin is with shift on your system, or not?
oh... and have a nice day.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
The behaviour is known to happen since i know XP. And it has nothing to be with a file is in use or not, as the file is indeed deleted.
I use SHIFT while delete a file/s; just to avoid that damned file to be created in the root partition letter. But PB functions create it; that is why PB functions act like if i delete without-SHIFT key pressed.
I doubt it does not happen to you.
No.Kaeru Gaman wrote: you said that you reconfigured your trashbin to completely delete by default.
that means, moving to trashbin is with shift on your system, or not?
I use SHIFT while delete a file/s; just to avoid that damned file to be created in the root partition letter. But PB functions create it; that is why PB functions act like if i delete without-SHIFT key pressed.
I doubt it does not happen to you.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
ok... so you description above led me wrong...
so you problem is not that the file is not deleted...
your problem is, that an inexisting trashbin on a partition is newly created though it's not used?
... sorry but why in the world don't you write that
but puzzle people by talking about truly erasing/not erasing?
so you problem is not that the file is not deleted...
your problem is, that an inexisting trashbin on a partition is newly created though it's not used?
... sorry but why in the world don't you write that
but puzzle people by talking about truly erasing/not erasing?

oh... and have a nice day.
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
Damn. Where i wrote the file was not erased?
The file is normally erased. But there is created a file named Recycled in the letter partition where the erased file hanged from; i.e. if i delete a file located in D:\sdsf\wrer\ then in D:\ appears the Recycled file as hidden and with the standard trash icon.
I guess in some way the "erased" file is contained in that Recycled file/folder created.
Anyway not important, there are other really important things, forget it.
The file is normally erased. But there is created a file named Recycled in the letter partition where the erased file hanged from; i.e. if i delete a file located in D:\sdsf\wrer\ then in D:\ appears the Recycled file as hidden and with the standard trash icon.
I guess in some way the "erased" file is contained in that Recycled file/folder created.
Anyway not important, there are other really important things, forget it.
- Kaeru Gaman
- Addict
- Posts: 4826
- Joined: Sun Mar 19, 2006 1:57 pm
- Location: Germany
- Psychophanta
- Always Here
- Posts: 5153
- Joined: Wed Jun 11, 2003 9:33 pm
- Location: Anare
- Contact:
What about to read the entire thing?Trond wrote:Psychophanta wrote:Damn. Where i wrote the file was not erased?Since DeleteFile() and DeleteDirectory() functions do not delete file...
@Kaeru, the matter is that i believed the file went to that Recycled folder (i know it is indeed a system folder because when i delete it the system complains and warns about to delete a .ini system file). That is the reason of the title. So yes, you are right in part, sorry.Since DeleteFile() and DeleteDirectory() functions do not delete file as it does when in windows is pushed SHIFT key and DELETE key at the same time
