diff --git a/pd/nw/pdgui.js b/pd/nw/pdgui.js
index 7e90a25941a92a63259b6fee7f4e5af48794c3ab..f2312632672fe0aca401ed98eeaff79a6e3bfb09 100644
--- a/pd/nw/pdgui.js
+++ b/pd/nw/pdgui.js
@@ -5668,6 +5668,9 @@ function file_dialog(cid, type, target, start_path) {
     // it just doesn't work. So this requires us to have the parent <span>
     // around the <input>. Then when we change the innerHTML of the span the
     // new value for nwworkingdir magically works.
+    if(nw_os_is_windows) {
+        start_path = start_path.replace(/\//g, '\\');
+    }
     dialog_options = {
         style: "display: none;",
         type: "file",