ok i need some help on programming a "delete" button that needs to do the following:

it needs to access a server "\\server" and then a sub share on that folder so: "\\server\subshare" then it needs to delete everything in the subshare folder completely. does anyone have any suggestions?

Use FindFirstFile() and FindNextFile() to get the list of al the files that need to be deleted. Look in the c++ code snippets and you will find example code. Once you get that going then you can figure out how to program the delete button.

The following uses the command shell, but is very simple.

system("echo y|del \\\\server\\subshare>nul");

The echo y | sends the confirmation 'y' character to tell the delete command that it's ok to delete all files in the directory. The >nul stops the output being displayed.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.