Results 1 to 3 of 3
  1. #1
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    DeleteFolder - permisssion denied (WordXP)

    My code does:

    fs.CopyFolder strCurrentDirectory, strTarget
    fs.DeleteFolder strCurrentDirectory, True

    The copy works fine, and the delete half works - it deletes the files but baulks at the directory giving a "Permission Denied" error
    (Yes, I know in theory I should use a MoveFolder - but that doesn't even do the move!)

    Help!

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: DeleteFolder - permisssion denied (WordXP)

    The name strCurrentDirectory suggests that some process is using that folder, and therefore not allowing it to be deleted. Can you determine from your code if that might be the case? For example, if you opened a file from there using the File>Open dialog, you could change the file open directory away from that folder using ChangeFileOpenDirectory (that's from memory, please check the help file as needed).

  3. #3
    2 Star Lounger
    Join Date
    Nov 2003
    Location
    Christchurch, Canterbury
    Posts
    122
    Thanks
    27
    Thanked 1 Time in 1 Post

    Re: DeleteFolder - permisssion denied (WordXP)

    Thanks - yes, I was checking if there was anything to do. Now fine. <img src=/S/stupidme.gif border=0 alt=stupidme width=30 height=30>

Posting Permissions

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