All templates
Desktop AutomationBeginner
Open a Folder
Robomotion•Updated 6 months ago

Overview
Launches the system file explorer pointed at a given path. Minimal template demonstrating the Application.Launch node.
Open a Folder
Interacting with the file system is essential in most home and business automation scenarios. Using Robomotion, you can automatically open specific folders in File Explorer and directly interact with their content.
What Open a Folder can do
- Build Documents Path (
Core.Programming.Function) — setsmsg.documents_folder_pathto<$Home$>\Documents. - Input Dialog titled
Open a folder, messageSelect the folder to open..., defaultmsg.documents_folder_path→msg.selected_folder. - Branch On Cancel (
Core.Programming.Function,outputs: 2) — routes toCore.Flow.Stopwhenmsg.selected_folderis empty/whitespace. - Build Args (
Core.Programming.Function) — setsmsg.explorer_args = [msg.selected_folder]. - Launch Explorer (
Core.Process.StartProcess,optBackground: true,continueOnError: true) —inFilePath: explorer.exe,inArguments: msg.explorer_args→msg.app_process_id, thenCore.Flow.Stop.
Behind the scenes
explorer.exeis launched with the folder path as its sole argument, so Windows opens a new File Explorer window rooted at that folder.continueOnError: truekeeps the flow from aborting if the path is invalid or explorer is unavailable; the flow simply falls through toCore.Flow.Stop.- To port to Linux/macOS, swap
explorer.exeforxdg-open/openand dropmsg.app_process_id— those shells typically exit immediately after dispatching to the desktop environment.