Loading ...
Sorry, an error occurred while loading the content.
 

How to copy from UNC path?

Expand Messages
  • Tim Musson
    I am looking for a way to copy a file from a UNC path to c: Program Files passwdHk in a batch file I run from the UNC path (doing a small install.) For
    Message 1 of 6 , Sep 25, 2003
      I am looking for a way to copy a file from a UNC path to
      "c:\Program Files\passwdHk" in a batch file I run from
      the UNC path (doing a small install.)

      For example:
      UNC = \\uas101660\passwdHk
      file = blat.exe (lives on the UNC share)

      ,----- [ test.bat on the UNC share ]
      | copy /Y blat.exe c:\Program Files\passwdHk
      `-----

      ,----- [ output of test.bat ]
      | CMD.EXE was started with '\\uas101660\passwdHk' as the current directory
      | path. UNC paths are not supported. Defaulting to Windows directory.
      |
      | >copy /Y blat.exe "c:\Program Files\passwdHk"
      | File not found - blat.exe
      | 0 File(s) copied
      `-----

      Any suggestions?

      --
      Tim Musson
      Flying with The Bat! eMail v1.62q
      Windows 2000 5.0.2195 (Service Pack 3)
      According to my dogs, the devil is alive and well and living in my
      vacuum cleaner.
      Blat Manager, current version is 2.2, see www.blat.net
    • pgv101
      Try this: http://www.winguides.com/registry/display.php/1247/ Allow UNC Paths at the Command Prompt (Windows NT/2000/XP) The Command Processor normally checks
      Message 2 of 6 , Sep 25, 2003
        Try this:

        http://www.winguides.com/registry/display.php/1247/

        Allow UNC Paths at the Command Prompt (Windows NT/2000/XP)
        The Command Processor normally checks and disallows UNC names from
        being used for the current directory in the Command Prompt as they
        may cause problems with launched child processes. This tweak can be
        used to allow UNC paths and remove the warning message.


        User Key: [HKEY_CURRENT_USER\Software\Microsoft\Command Processor]
        Value Name: DisableUNCCheck
        Data Type: REG_DWORD (DWORD Value)
        Value Data: (0 = default, 1 = allow UNC)
      • RobertStrom
        As long as you re on WinNT and about pushd and popd should work great. C: Documents and Settings Robert pushd rs-xp drop V: This will automatically map a
        Message 3 of 6 , Sep 29, 2003
          As long as you're on WinNT and about pushd and popd should work
          great.

          C:\Documents and Settings\Robert>pushd \\rs-xp\drop

          V:\>

          This will automatically map a drive. Now you just need to copy from
          this drive to wherever. Then popd back to where you were, unmapping
          the drive.

          V:\>popd

          C:\Documents and Settings\Robert>

          C:\Documents and Settings\Robert>pushd /?
          Stores the current directory for use by the POPD command, then
          changes to the specified directory.

          PUSHD [path | ..]

          path Specifies the directory to make the current directory.

          If Command Extensions are enabled the PUSHD command accepts
          network paths in addition to the normal drive letter and path.
          If a network path is specified, PUSHD will create a temporary
          drive letter that points to that specified network resource and
          then change the current drive and directory, using the newly
          defined drive letter. Temporary drive letters are allocated from
          Z: on down, using the first unused drive letter found.


          C:\Documents and Settings\Robert>popd /?
          Changes to the directory stored by the PUSHD command.

          POPD


          If Command Extensions are enabled the POPD command will delete
          any temporary drive letter created by PUSHD when you POPD that
          drive off the pushed directory stack.

          HTH,

          Robert


          --- In batchworld@yahoogroups.com, Tim Musson <blat@s...> wrote:
          >
          > I am looking for a way to copy a file from a UNC path to
          > "c:\Program Files\passwdHk" in a batch file I run from
          > the UNC path (doing a small install.)
          >
          > For example:
          > UNC = \\uas101660\passwdHk
          > file = blat.exe (lives on the UNC share)
          >
          > ,----- [ test.bat on the UNC share ]
          > | copy /Y blat.exe c:\Program Files\passwdHk
          > `-----
          >
          > ,----- [ output of test.bat ]
          > | CMD.EXE was started with '\\uas101660\passwdHk' as the current
          directory
          > | path. UNC paths are not supported. Defaulting to Windows
          directory.
          > |
          > | >copy /Y blat.exe "c:\Program Files\passwdHk"
          > | File not found - blat.exe
          > | 0 File(s) copied
          > `-----
          >
          > Any suggestions?
          >
          > --
          > Tim Musson
          > Flying with The Bat! eMail v1.62q
          > Windows 2000 5.0.2195 (Service Pack 3)
          > According to my dogs, the devil is alive and well and living in my
          > vacuum cleaner.
          > Blat Manager, current version is 2.2, see www.blat.net
        • Michael Marquart
          On stardate Mon, 29 Sep 2003 13:40:52 -0000, Captain RobertStrom spake ... Neat! Thanks for the tip. -- Regards, Michael
          Message 4 of 6 , Sep 29, 2003
            On stardate Mon, 29 Sep 2003 13:40:52 -0000, Captain RobertStrom spake
            thusly:

            > C:\Documents and Settings\Robert>pushd /?
            > Stores the current directory for use by the POPD command, then
            > changes to the specified directory.
            >
            > PUSHD [path | ..]
            >
            > path Specifies the directory to make the current directory.
            >
            > If Command Extensions are enabled the PUSHD command accepts
            > network paths in addition to the normal drive letter and path.
            > If a network path is specified, PUSHD will create a temporary
            > drive letter that points to that specified network resource and
            > then change the current drive and directory, using the newly
            > defined drive letter. Temporary drive letters are allocated from
            > Z: on down, using the first unused drive letter found.

            Neat! Thanks for the tip.

            --
            Regards,
            Michael
          • Tim Musson
            Hey RobertStrom, My MUA believes you used eGroups-EW/0.82 to write the following on Monday, September 29, 2003 at 9:40:52 AM. R As long as you re on WinNT and
            Message 5 of 6 , Sep 29, 2003
              Hey RobertStrom,

              My MUA believes you used eGroups-EW/0.82
              to write the following on Monday, September 29, 2003 at 9:40:52 AM.

              R> As long as you're on WinNT and about pushd and popd should work
              R> great.

              Very cool, thanks for the tip, I will check it out!

              --
              Tim Musson
              Flying with The Bat! eMail v1.62q
              Windows 2000 5.0.2195 (Service Pack 3)
              Don't get old, you will live to regret it.
              Blat Manager, current version is 2.2, see www.blat.net
            • Derek Byrne
              Nice one!! Definitely a boon! :o) ... From: RobertStrom [mailto:rstrom@ins.com] Sent: 29 September 2003 14:41 To: batchworld@yahoogroups.com Subject: [BATCH
              Message 6 of 6 , Sep 29, 2003
                Nice one!! Definitely a boon! :o)

                -----Original Message-----
                From: RobertStrom [mailto:rstrom@...]
                Sent: 29 September 2003 14:41
                To: batchworld@yahoogroups.com
                Subject: [BATCH WORLD] Re: How to copy from UNC path?


                As long as you're on WinNT and about pushd and popd should work
                great.

                C:\Documents and Settings\Robert>pushd \\rs-xp\drop

                V:\>

                This will automatically map a drive. Now you just need to copy from
                this drive to wherever. Then popd back to where you were, unmapping
                the drive.

                V:\>popd

                C:\Documents and Settings\Robert>

                C:\Documents and Settings\Robert>pushd /?
                Stores the current directory for use by the POPD command, then
                changes to the specified directory.

                PUSHD [path | ..]

                path Specifies the directory to make the current directory.

                If Command Extensions are enabled the PUSHD command accepts
                network paths in addition to the normal drive letter and path.
                If a network path is specified, PUSHD will create a temporary
                drive letter that points to that specified network resource and
                then change the current drive and directory, using the newly
                defined drive letter. Temporary drive letters are allocated from
                Z: on down, using the first unused drive letter found.


                C:\Documents and Settings\Robert>popd /?
                Changes to the directory stored by the PUSHD command.

                POPD


                If Command Extensions are enabled the POPD command will delete
                any temporary drive letter created by PUSHD when you POPD that
                drive off the pushed directory stack.

                HTH,

                Robert


                --- In batchworld@yahoogroups.com, Tim Musson <blat@s...> wrote:
                >
                > I am looking for a way to copy a file from a UNC path to
                > "c:\Program Files\passwdHk" in a batch file I run from
                > the UNC path (doing a small install.)
                >
                > For example:
                > UNC = \\uas101660\passwdHk
                > file = blat.exe (lives on the UNC share)
                >
                > ,----- [ test.bat on the UNC share ]
                > | copy /Y blat.exe c:\Program Files\passwdHk
                > `-----
                >
                > ,----- [ output of test.bat ]
                > | CMD.EXE was started with '\\uas101660\passwdHk' as the current
                directory
                > | path. UNC paths are not supported. Defaulting to Windows
                directory.
                > |
                > | >copy /Y blat.exe "c:\Program Files\passwdHk"
                > | File not found - blat.exe
                > | 0 File(s) copied
                > `-----
                >
                > Any suggestions?
                >
                > --
                > Tim Musson
                > Flying with The Bat! eMail v1.62q
                > Windows 2000 5.0.2195 (Service Pack 3)
                > According to my dogs, the devil is alive and well and living in my
                > vacuum cleaner.
                > Blat Manager, current version is 2.2, see www.blat.net



                To Post a message, send it to: batchworld@...

                To Unsubscribe, send a blank message to: batchworld-unsubscribe@...

                Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



                ************************************************************************
                Meteor web site http://www.meteor.ie
                ************************************************************************
              Your message has been successfully submitted and would be delivered to recipients shortly.