Salman Maredia

Hi,

I am newbie. i want to delete the folder. suppose folder contain subfolder and files. when i use the RemoveDirectory function it delete the folder when it is empty. and DeleteFolder function need namespace IStoreNamespace. how i use namespace in MFC windows device application (C++.2005).
is there any other Method for deleting the fill folder

Thanks
-Salman



Re: Smart Devices Native C++ Development Deleting Folder

Marinus Holkema

You can use a namespace with the using namespace directive:

using namespace namespace_name;






Re: Smart Devices Native C++ Development Deleting Folder

Salman Maredia

hi,

Do u have any sample code for deleting folder using DeleteFolder because i have confussion with the parameters. I am using C++.net 2005

Thanks

-Salman





Re: Smart Devices Native C++ Development Deleting Folder

Salman Maredia

hi,

how to use rmdir

_rmdir(\\My Documents\\abc\\);

i wrote this line in the code and include direct.h file but it give the linker error like

test.obj : error LNK2019: unresolved external symbol _rmdir referenced in function wmain

Windows Mobile 5.0 Smartphone SDK (ARMV4I)\Debug/test.exe : fatal error LNK1120: 1 unresolved externals

how to use it is there any method that kill parent directory and child directory as well.

Thanks
-Salman





Re: Smart Devices Native C++ Development Deleting Folder

Michael Koster

Hi Salman

_rmdir is not available on Windows CE - use the Win32 API RemoveDirectory instead.

This sample might help as well:
http://www.codeguru.com/cpp/w-p/files/comments.php/c4479/ thread=52622

Michael