CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    May 1999
    Posts
    66

    RemoveDirectory and _rmdir do not work.

    The RemoveDirectory(strdir) and _rmdir(strdir) are not working...Any ideas?


  2. #2
    Join Date
    May 1999
    Location
    UK
    Posts
    59

    Re: RemoveDirectory and _rmdir do not work.

    Did you remember that path strings (if they are literal) need double-backslash characters?

    RemoveDirectory("C:\\MyDir\\MySubDur");



    Also, the function will fail if there are any files in the directory or you have an active DOS session in that directory.

    MJA

  3. #3
    Join Date
    Apr 1999
    Location
    Chennai, India
    Posts
    48

    Re: RemoveDirectory and _rmdir do not work.

    check SHFileOperation


  4. #4
    Join Date
    May 1999
    Posts
    66

    Re: RemoveDirectory and _rmdir do not work.

    Yes, the strDir path is correct, and the directory structure is empty of files (deleted earlier). There are also no DOS boxes active within the structure. RemoveDirectory gives an "Files being used by another process" error and _rmdir gives no error, but also does not delete. The code is running on WinNT. If you can offer any more help, it would be much appreciated.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured