Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: is posible COPY longpath file?  (Read 2418 times)

0 Members and 1 Guest are viewing this topic.

Alexey

  • Guest
is posible COPY longpath file?
« on: November 13, 2005, 11:09:40 PM »
Hi there.

    I'm try to do this kind of COPY:

copy \\main\c\dir0\dir1\dir2\dir3\dir4\file.txt \\additional /y
   
    As a result i get this: The network path was not found.
   When i try short path, like:

copy \\main\c\dir0\dir1\dir2\dir3\file.txt \\additional /y

  Everything works fine.
  Whay i'm doing wrong? Or may be there is some copy-comand restriction?
 
Thanks in advance.

 



viking



    Adviser
  • miaow-miaow 2.0 for networks
  • Thanked: 1
    Re: is posible COPY longpath file?
    « Reply #1 on: November 14, 2005, 12:09:36 AM »
    Well...
    copy [long_path] \\additional /y
    \\additional is the name of a computer; you also need the name of a folder

    You want to copy something to a folder in the computer "\\additional"; that folder it's a share; you can see the valid names you can use by verifying the share names on that computer. For example, on the computer called "additional" you have the following shares:
    a -- which on additional computer is in fact: c:\dir1\share1 folder
    b -- --II-- c:\dir1\share2
    To copy to one of those folders:
    copy \\main\c\dir0\dir1\dir2\dir3\dir4\file.txt \\additional\a /y

    And yes, it is a filename length restriction: 256 characters maximum for a path (if I remember well).
    So, if your [long_path] has more than 256 characters, you have to do something to reduce it.

    Gustaaf

    • Guest
    Re: is posible COPY longpath file?
    « Reply #2 on: November 20, 2005, 03:10:50 PM »
    Keep in mind that Windows makes use of Hidden DRIVE shares.

    your C: drive is shaerd as C$.
    to make sure you can copy, you need to authenticate first if it is differrent network.

    NET USE \\REMOTEPC\ADMIN$ /USER:MYDOMAIN\MYADMIN PASSWORD.

    This will create a temporary connection to that machine.

    So to copy from your PC to remote PC do this.

    Copy /Y c:\temp\*.* \\remotepc\C$\TEMP.

    To use Long File names and Spaces.. Do this.
    copy /Y c:\temp\*.* \\"remotepc\c$\temp\directory with spaces"

    I might be mistaken about the open " " it could be "\\..."

    I believe there is a 256 character DOS limit for typing commands.
    « Last Edit: November 20, 2005, 03:13:18 PM by Gustaaf »