Hi Jarmo, thanks, your're right, I had a problem with the starting backslash as well.
Names Default To Here( 1 );
base_path = "C:\Program Files\"; // works
base_path = Get Default Directory();
// starting backslash makes problems, needs to be removed
// "/C:/Users/raming/OneDrive - Documents/"
base_path = Substr( base_path, 2, Length( base_path ) );
command = Eval Insert( "dir \!"^base_path^\!"" );
Show( command );
RP = Run Program(
Executable( "cmd.exe" ),
Options( Insert( {"/a", "/q", "/c"}, command ) ),
// ReadFunction( Function( {this}, Write( this << read ) ) )
readfunction( "Text" )
);
Georg