FileSystemObject Folder.Delete returns "Path not found" for really long paths
I have this code which i run with different values for sPath
This works well until it ran on several paths...when I get the following error
Dim oFSO As new Scripting.FileSystemObject
Dim oFolder As Scripting.Folder
Set oFolder = oFSO.GetFolder(sPath)
Error 76, "Path not found"
I have obviously checked and the paths do exist, and i do have permissions to read/delete them
I believe that the command tries to delete the folder, but firsts tries to delete the file under it, and this file has a absolute path which is over 256 characters long, which seams to exceed some limit in windows and prevents me from deleting the folder.
Any Ideas how I can delete the directory (recursively) without getting this problem?
All code on this page is protected by an SEP field!!!