Forum Moderators: phranque
[i]C:\"Program Files"\"Internet Explorer"\iexplore.exe C:directory\file.html[/i] The browser opens fine, but instead of loading C:directory/file.html, the browser tries to open http://files"/"Internet%20Explorer"/iexplore.exe%20C:directory/file.html, which doesn't exist, and I get an error message. Does anyone know what I'm doing wrong?
Assuming that IE is the default browser, there should be no need to specify the browser on the command line in DOS. As with opening a .txt file, if notepad is associated with .txt files, it should open.
Also, the filename must be in quotes if it contains spaces.
Also, since this is IE, the filename spec may need / instead of \ if you are specifying the browser explicitly.
Just a few thoughts,
Kaled.
This was the old code:
[b]my $current_path = Win32::GetCwd();
$current_path = $current_path . "\\edited\\new\.html";
system ("C:\\\"Program Files\"\\\"Internet Explorer\"\\iexplore\.exe $current_path");[/b] This is the new code:
[b]my $current_path = Win32::GetCwd();
$current_path =~ s/\\/\//g;
$current_path = $current_path . "\/edited\/new\.html";
system ("\"C:\\Program Files\\Internet Explorer\\iexplore\.exe\" $current_path");[/b]