Ask a Question

Delete Folder error

SOLVED
xx97
Occasional Contributor

Delete Folder error

Hi, I try to delete a non-empty folder but it says "No folders that correspond to folder path"

Here is my code:

function Deletingfolder()
{
aqFileSystem.DeleteFolder("folderpath",true);
}
3 REPLIES 3
mattb
Staff

Hi,

Is the "folderpath" parameter declared? 

IE:
"folderpath" = C\ Windows\FolderYouWantToDelete

xx97
Occasional Contributor

Hi, thanks for the reply.

Yes the "folderpath" is declared before aqFileSystem.

Is the file path declared with proper syntax? IE we need 2 //.

Example Code:

function DeletingFiles()
{
 var sPath = "C:\\Temp\\*.txt";

 // Deletes the files
 aqFile.Delete(sPath);
}

https://support.smartbear.com/testcomplete/docs/reference/program-objects/aqfile/delete.html



If not could you supply an example of the file path you are using?

cancel
Showing results for 
Search instead for 
Did you mean: