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

Author Topic: xcopy symblic links from to directories in a text file  (Read 3950 times)

0 Members and 1 Guest are viewing this topic.

shcsbaker

    Topic Starter


    Newbie

    • Experience: Experienced
    • OS: Windows 7
    xcopy symblic links from to directories in a text file
    « on: January 21, 2016, 05:16:06 AM »
    I've got a text file with the full path and I want to copy all the symbolic links from a source folder to each folder in the text file.  Text file is called subs.txt looks like this:
    C:\data\2653\arc2015
    C:\data\8893\arc2015

    the real text file will have around 30 or so of these entries.  Here's what I've tried in several variations:

    for /f %%i in (subs.txt) DO xcopy "C:\forms\!SLinks\*.*" "%%i" /b /y

    nothing happens, no errors messages or anything.

    Thanks
    Kevin

    foxidrive



      Specialist
    • Thanked: 268
    • Experience: Experienced
    • OS: Windows 8
    Re: xcopy symblic links from to directories in a text file
    « Reply #1 on: January 21, 2016, 05:47:37 AM »
    I've got a text file with the full path and I want to copy all the symbolic links from a source folder to each folder in the text file.  Text file is called subs.txt looks like this:
    C:\data\2653\arc2015
    C:\data\8893\arc2015

    the real text file will have around 30 or so of these entries.  Here's what I've tried in several variations:

    for /f %%i in (subs.txt) DO xcopy "C:\forms\!SLinks\*.*" "%%i" /b /y

    Did you use a batch file or a command prompt?  How come you are using !slinks?  or is that a folder?

    From http://superuser.com/questions/148099/windows-7-symlinks-how-do-i-copy-a-symlink-to-a-directory

    Quote
    use the following command from elevated command prompt:
    xcopy /b /i <source symlink name> <destination symlink name> 
    it will say that 0 File(s) copied but the symlink will appear in the destination.  This is tested under Windows 7 and Windows 8.x  but should work starting as of Vista