~~David~~ has asked for the wisdom of the Perl Monks concerning the following question:

I would like to add a network location to the initial directory parameter of getSaveFile. However, when I change from drive letter notation to network notation(?), the initial directory does not open up. I did not find the perldoc useful for this question. Can anyone offer some help?
$filename = $file_mw->getSaveFile(-defaultextension=>".000", -initialdir => 'K:\somedir\somed +ir\somedir', #this works #-initialdir => '//somemaching/s +omedir/somedir', #this doesn't work -initialfile=> "name" );
~~David~~

Replies are listed 'Best First'.
Re: Adding Network Drive To Tk::getSaveFile
by NetWallah (Canon) on Mar 14, 2008 at 02:01 UTC
    What version of Tk are you using ?

    A patch for this issue was submitted:

    ----------------
    r9065 | srezic | 2007-02-10 22:51:41 +0100 (Sa, 10 Feb 2007) | 3 lines

    r1723@biokovo: eserte | 2007-02-10 21:51:30 +0100
    inc'd version to 804.027_500
    -------------------

    See this thread on the Activestate Forum.

         "As you get older three things happen. The first is your memory goes, and I can't remember the other two... " - Sir Norman Wisdom

      I have figured this out, but I don't understand why.

      This doesn't work:
      '\\somecomputer\somedir\somedir'

      This does work:
      "\\\\somecomputer\\somedir\\somedir"

      Anyone know why you have to double quote this in order to make it work?
      ~~David~~
      Thanks for the reply. I am using Tk 804.027, but I still don't know if this patch will fix my problem. Even if I format the network drive with forward slashes, getSaveFile still refuses to go the correct network dir, and opens the current active dir instead. Do you think the patch will fix this problem, even if the network location is formated in for the OS the script is running on?
      ~~David~~