Writing to Windows UNC Path

Clovertech Forums Read Only Archives Cloverleaf Cloverleaf Writing to Windows UNC Path

  • Creator
    Topic
  • #53046
    Marcus de Leon
    Participant

      Hi, I can’t seem to write to a windows UNC path via any method from Cloverleaf. Either Tcl or Fileset, none seem to work. See error below:

      Code:

      [sms :sms :ERR /0: BG_Inboxes:04/12/2012 13:47:10] Tcl error:
      msgId = message0
      proc = ‘WriteToBGInbox’
      args = ”
      result = ‘couldn’t open “\cmsfile001CPSSIM80LL13342528307053.ht”: invalid argument’
      errorInfo: ‘
      couldn’t open “\cmsfile001CPSSIM80LL13342528307053.ht”: invalid argument
      while executing
      “open $FilePath “w””
      (”run” arm line 29)
      invoked from within
      “switch -exact — $mode {
      start {
      # Perform special init functions
      # N.B.: there may or may not be a MSGID key in args
      …”
      (procedure “WriteToBGInbox” line 15)
      invoked from within
      “WriteToBGInbox {MSGID message0} {CONTEXT sms_ob_data} {ARGS {}} {MODE run} {VERSION 3.0}”‘

      Any ideas or work arounds?

    Viewing 2 reply threads
    • Author
      Replies
      • #76359
        Levy Lazarre
        Participant

          Hi Marcus,

          Tcl on Windows does not support UNC filenames the way you are trying to use it.

          You have to create a network share on the destination server and access the file using the syntax:

          \servernamesharenamepathfile

          I hope this helps.

        • #76360
          Marcus de Leon
          Participant

            Hi thanks for the reply. So there is no way to write a file to a UNC path at all?

          • #76361
            Charlie Bursell
            Participant

              You can do it via Tcl.  UPoC driver, etc.

              In Tcl it is better to use the Unix style of separators even on Windows.  You still need the \ at the front

              So for UNC something like

              set path {\mynet/Share/xxx/yyy}

              write_file [file join $path test.txt] “HELLO WORLD”

              Works for me

          Viewing 2 reply threads
          • The forum ‘Cloverleaf’ is closed to new topics and replies.