Newbie: (Safely) deleting files
-
Hi! In my program I have a path to a file that I want to delete. I have looked all over google and here and can't find any explanation of what code I should use to delete this file without running any risks of formatting hardrdives etc... I thought of using ShellExecute with del but was not sure if that was such a good idea. Any help greatfully received! Dom
-
Hi! In my program I have a path to a file that I want to delete. I have looked all over google and here and can't find any explanation of what code I should use to delete this file without running any risks of formatting hardrdives etc... I thought of using ShellExecute with del but was not sure if that was such a good idea. Any help greatfully received! Dom
What is wrong with ::DeleteFile(LPCTSTR pszFileName)?
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
Hi! In my program I have a path to a file that I want to delete. I have looked all over google and here and can't find any explanation of what code I should use to delete this file without running any risks of formatting hardrdives etc... I thought of using ShellExecute with del but was not sure if that was such a good idea. Any help greatfully received! Dom
Hi Dom, Why not use DeleteFile from win32 api ? BOOL DeleteFile( LPCTSTR lpFileName // file name ); Vitali http://www.creative-case.com
-
What is wrong with ::DeleteFile(LPCTSTR pszFileName)?
Build a man a fire, and he will be warm for a day
Light a man on fire, and he will be warm for the rest of his life! -
Hi! In my program I have a path to a file that I want to delete. I have looked all over google and here and can't find any explanation of what code I should use to delete this file without running any risks of formatting hardrdives etc... I thought of using ShellExecute with del but was not sure if that was such a good idea. Any help greatfully received! Dom
If you wish to send files to the recycle bin instead of just deleting them, use the SHFileOperation(...) function. It is a little tricky to use, but you can do a lot of cool stuff with it. See the MSDN. Hack on!:) Jonathan Craig www.mcw-tech.com
-
Hi! In my program I have a path to a file that I want to delete. I have looked all over google and here and can't find any explanation of what code I should use to delete this file without running any risks of formatting hardrdives etc... I thought of using ShellExecute with del but was not sure if that was such a good idea. Any help greatfully received! Dom
-
Hi! In my program I have a path to a file that I want to delete. I have looked all over google and here and can't find any explanation of what code I should use to delete this file without running any risks of formatting hardrdives etc... I thought of using ShellExecute with del but was not sure if that was such a good idea. Any help greatfully received! Dom
the typical newbie... they always want to code things much too difficult for them... i know that feeling... Don't try it, just do it! ;-)