Delete Folder error
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-25-2022
06:08 PM
01-25-2022
06:08 PM
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);
}
Solved! Go to Solution.
3 REPLIES 3
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-26-2022
06:28 AM
01-26-2022
06:28 AM
Hi,
Is the "folderpath" parameter declared?
IE:
"folderpath" = C\ Windows\FolderYouWantToDelete
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-27-2022
05:52 PM
01-27-2022
05:52 PM
Hi, thanks for the reply.
Yes the "folderpath" is declared before aqFileSystem.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-31-2022
06:29 AM
01-31-2022
06:29 AM
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?
