Closing a windows folder

Hi all, I open a folder using a keyboard shortcut. To keep things clean, I want to close the folder when I have opened the required files. I use a close application action and spy the whole open window. However when I run this, it gets rid of my task bar and I have to restart my PC to get it back. What’s the best way to close a windows folder?
Thanks in advance,
Jordan

Hi
even without opening the folder we can get the files we want like this
out_filepath = Directory.GetFiles(“yourfolderpath”)
where out_filepath is a variable of type string array
–now use a for each loop and pass the above variable as input and change the type argument as string in the property panel of for each loop
–now we can use start process to access those files by passing item as to input the file path property of start proces activity

hope this would help you
Cheers @jordrowley

1 Like

@jordrowley

use shortcuts like alt+F4 migth work

Ajay

2 Likes

This sounds great and a totally different way of getting what I need so I will happily try it now, thanks for the extra info. Real help.

Jordan

1 Like

That worked fine, thank you. So can use this method as well as the one mentioned above. Thanks for replying.
Jordan

Cheers @jordrowley

cheers @jordrowley

Hi @Palaniyappan, please can I ask a cheeky bonus question. Now I’ve open my applications (ExpenseIt and Adobe Acrobat), what’s the best way of checking they are open? Check an element on screen exists or if there a better way?

Thanks
Jordan

we can check with this
–use get processes activity and get the output with a variable named out_processes
–now use a for each loop and pass the above variable as input and let the type argument property be as object in the property panel of for each loop
–inside this we can use if condition like this
item.ToString.Contains(“AcroRd32”)
if the above condition passes it will go to THEN part where we can mention a message box like
“acrobat is open”

hope this would help you
Cheers @jordrowley

1 Like

@Palaniyappan - fantastic, I will build this now. As you are based in Chennai I hope you got to se M S Dhoni play for the Chennai Super Kings. Thanks for all the help,
Jordan

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.