Delete a folder with a wildcard character
I have an application that creates a unique folder name each time an iteration occurs and needs to be deleted after a job has completed.
I’ve tried using wildcard characters to delete it but nothing has worked. The only commonality with the folder name is the beginning four characters are always the same.
I’ve tried and this doesn’t work.
Welcome to our Forum! The application that created this folder, is probably locking this folder, and therefore you cannot delete it. Try terminating the application prior to deleting the folder. To get the folder name, all you will need to do is use the “Get Subfolders in Folder” action, and then, within “For Each” a loop, check if the %CurrentFolder.Name% starts with cASM, if so, then Exit the Loop, and delete the %CurrentFolder% I’m attaching a sample job to help you understand the jobflow. Samantha
The information was really helpful and will be implemented. I also created a vbs script that I called from WinAutomation that was a little easier. Here’s the code if anyone would find this useful.
Dim FSO, Folder
Cool! Thanks for sharing! Btw… In WinAutomation v.4 you’ll also be able to run vb scripts from within WinAutomation! Samantha
Our Technical Support Forum is Going Social!
Attention, great news! This forum will soon be transferred to LinkedIn. If you are a WinAutomation customer please send us a request to join WinAutomation Customer Technical Support LinkedIn group.
You may also request WinAutomation support by opening a support ticket.
Alternatively, you may contact us via email at firstname.lastname@example.org or, for general inquiries, you can send us your message by submitting the Contact Us webform.
Thank you for Automating with us!
Viewing 5 posts - 1 through 5 (of 5 total)