xx97
3 years agoOccasional 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);
}
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()\n{\naqFileSystem.DeleteFolder(\"folderpath\",true);\n}
","body@stringLength":"267","rawBody":"Hi, I try to delete a non-empty folder but it says \"No folders that correspond to folder path\"
Here is my code:
Hi,
Is the \"folderpath\" parameter declared?
IE:
\"folderpath\" = C\\ Windows\\FolderYouWantToDelete
Hi, thanks for the reply.
Yes the \"folderpath\" is declared before aqFileSystem.
","body@stripHtml({\"removeProcessingText\":false,\"removeSpoilerMarkup\":false,\"removeTocMarkup\":false,\"truncateLength\":200})@stringLength":"82","kudosSumWeight":0,"postTime":"2022-01-27T17:52:14.789-08:00","lastPublishTime":"2022-01-27T17:52:14.789-08:00","metrics":{"__typename":"MessageMetrics","views":695},"visibilityScope":"PUBLIC","placeholder":false,"originalMessageForPlaceholder":null,"isEscalated":null,"solution":false,"entityType":"FORUM_REPLY","eventPath":"category:TestComplete_forum/community:nwkab66374board:testcomplete-questions/message:229042/message:229167","replies":{"__typename":"MessageConnection","pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null},"edges":[{"__typename":"MessageEdge","cursor":"MjQuMTF8Mi4xfG98MXwxNDowLDM5OjF8MQ","node":{"__ref":"AcceptedSolutionMessage:message:229268"}}]},"customFields":[],"attachments":{"__typename":"AttachmentConnection","edges":[],"pageInfo":{"__typename":"PageInfo","hasNextPage":false,"endCursor":null,"hasPreviousPage":false,"startCursor":null}}},"ModerationData:moderation_data:229268":{"__typename":"ModerationData","id":"moderation_data:229268","status":"APPROVED","rejectReason":null,"isReportedAbuse":false,"rejectUser":null,"rejectTime":null,"rejectActorType":null},"AcceptedSolutionMessage:message:229268":{"__typename":"AcceptedSolutionMessage","author":{"__ref":"User:user:97485"},"id":"message:229268","revisionNum":1,"uid":229268,"depth":3,"hasGivenKudo":false,"subscribed":false,"board":{"__ref":"Forum:board:testcomplete-questions"},"parent":{"__ref":"ForumReplyMessage:message:229167"},"conversation":{"__ref":"Conversation:conversation:229042"},"subject":"Re: Delete Folder error","moderationData":{"__ref":"ModerationData:moderation_data:229268"},"body":"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?