Creating a copy of a folder that is populated with shortcuts.

Page 1 of 2 12 LastLast

  1. Posts : 232
    Win 10 Ver 1903
       #1

    Creating a copy of a folder that is populated with shortcuts.


    This was the theory anyway. We tossed the idea around but I can only envision it being done in multiple steps with several different programs to create the whole thing. There has got to be an easier way that we have just never used.

    The folder is local on a shared drive. The "copy" of the folder would be on the same share-drive. But the contents of the copy would be Shortcuts linking to all the files and folders in the Original.
    The purpose haas to do with people dragging full copies of the original files off to other folders on the same shared drive as no one knows how to create shortcuts. (Or they simply won't perform the extra click to do so) The master shared drive is now full of hundreds GB of duplicates

    The thought was to allow the Users Read Only access to the "shortcuts only" version so they can't drag the shortcut out but would be able to drag out their own copy of it. I would not mind if they copied as many shortcuts as they wanted. Each is only 1k.

    If this is a standard operation in Windows that I am simply not aware of named "virtual folders" or other, I can accept that. As long as it can be done, and someone can send me the link to instructions, everyone would be happy.

    Eventually, these will all be moved to Onedrive but until then, I have to live with the space available on the fileserver.
      My Computer


  2. Posts : 456
    Windows 10
       #2

    1. Open both folders the shared drive with the original files and the shared drive where you want to create shortcuts.

    2. On the drive with the original files press CTRL + A to select all. Press and Hold CTRL + SHIFT while you drag the Original files to the drive where you want to create shortcuts. This should create shortcuts of the files in the shared drive with the original files.

    Also you can use a duplicate file finder to delete duplicate files in shared drive with the original files.
      My Computer


  3. Posts : 232
    Win 10 Ver 1903
    Thread Starter
       #3

    I hope that works. hat has to work for ALL content. The original folder had 30 sub-folders each of which has 30 or more sub sub folders and many of them have Sub Sub Sub folder before you get the to the files. I need what I wold call a "Virtual folder ful of Virtual Files". Those are just terms i thought might make the concept easier to understand. Anyway the VF (Virtual Folder) should have just as many hyperlinks as the original has of total files and folders so the results should be easy to check Total content of original is close to 15,000 items. VF should have just as many in Hyperlinks

    I know of a way to create shortcuts (hyperlinks) to all of them with a batch script that could run recursively looping through the full original folder to created links to each file and folder. It would be slower but It WOULD do the trick as i have use it before on smaller projects. Never anything this large and I was hoping for some MS gimmick to accomplish the same thing on larger scale. Something quick and easy like you suggested. I am just making sure it WOULD loop through each file in each folder on a folder by folder basis to the end. I cant do a real test until tomorrow but thanks for the idea and will report back if it does the job.
    I hope it works because if it does i have some other things i want to try with it. Thanks very much for the Info.
    In some recent tests, the linked files/folders All went Well. I was ready to Go For Broke and run that script over the full 15K
    just to see what happened. If Ctrl+A and drag and drop can work>>,Much Better!
      My Computer


  4. Posts : 456
    Windows 10
       #4

    That could be something like this:

    1. Creating a folder structure in the shortcut share:

    net use x: \\network\OriginalFiles
    net use y: \\network\Shortcuts

    xcopy /t /e x: y:

    2 Copying shortcuts to the shortcuts share:

    for /r x: %a in (*) do mklink "y:%~pnxa" "x:%~pnxa"


    * The mklink command requires admin priviledges so you have to run the command or batch with Admin.

    I think the select all and paste with CTRL + SHIFT trick only works for the first level of folders since when you click on a "subfolder link" you are back to the original files so you have to create a "real folder structure" on the shortcus share full of links.
    Last edited by ricardobohner; 17 May 2019 at 08:12.
      My Computer


  5. Posts : 232
    Win 10 Ver 1903
    Thread Starter
       #5

    yep your mklink is similar to a tool i found several years ago. It was the one I intended to use as soon as i could "find some time"

    I have WAY too many "irons in the fire" right now. Some more important than others and this was one of the "thought projects"
    I will reply to this ASAP
    running that should not take too long. The Ctrl+A trick only works for top level but I see you already knew that

    Still, I had never tried the Ctrl+Shift A and that knowledge Too will be handy when I need it :)

    HMM!
    Ricardo. Mind telling me where to get mklink?
    No big deal but when I found the "trick" I had been using it was named xxmklink.exe.
    I vaguely remember that there WAS an original mklink.

    I also seem to remember that for some reason it would not work as I needed it to.
    This was a Long Time Ago. (That flowing white beard on my icon is a good indication of HOW long )

    The XX version of the exe file MIGHT be my own compiled version of what I had to do to the original. I normally don't just rename exe files for the heck of it. Need to do a little "hysterical research" .
    Back with answers soon. ( I hope!!)

    PS: your other option of CTRL SHIFT A etc did as you now say but it also left some interesting questions in its wake. If you are interested i would be happy to share the findings if you have not already found them also.
    Most people would think this is a total waste of time but i have found there is No Such Thing as "wasted time".
    You have to Live every second of your existence. As long as you learn something during that time it isn't wasted.
    Last edited by questorfla; 18 May 2019 at 20:05.
      My Computer


  6. Posts : 456
    Windows 10
       #6

    All the commands that I suggested are already included in the Windows command line. To open a command line you can type CMD in the start menu, hold CTRL + SHIF (since you need an elevated command prompt to run mklink) and press ENTER.

    You can create a batch file (bat extension) with that commands and run it whenever you need for example after adding new files to the original share.

    To know more about a command you and use this:

    command /?

    For example:

    mklink /?


    Looks like you have been using this:
    Creating a Shortcut from the command line (batch file)

    I made some tests here by creating a shortcuts folder on my computer that poins to my flash drive including all subfolders and I think It worked like you wanted it, people that access form the shortcut folder never have direct access to the original folder.

    So at least for me the for & mklink combination worked as I think you wanted it.
      My Computer


  7. Posts : 232
    Win 10 Ver 1903
    Thread Starter
       #7

    AHHH so...
    Time flies when one if having fun i guess. There is a crucial difference more or less. mklink is NOT quite the same thing as xxmklink. I take No Credit for either. !

    Both were 'stumbled upon' and after much back tracking I finally see what the difference is though i have yet to figure otu why it mattered but it did at the time for what i was trying to do... At That Time!
    If you have not yet found the full threads on both "nifty tools" I can point you to them
    Set your Time Machine circa 2011 approx. Google searches take you on a wild ride through many a website written in unusual characters: Example (탕 - 배치 파일에서 EXE에 대한 바로 가기 만들기 -)
    stick to "StackExchange" and StackOverflow" for best results.
      My Computer


  8. Posts : 232
    Win 10 Ver 1903
    Thread Starter
       #8

    I see you are Here! And i am overwriting your replies instead of paying attention. I have no doubt that your method works and i am sure you did test it. It was just an odd feeling of deja vu that bothered me.
      My Computer


  9. Posts : 456
    Windows 10
       #9

    xxmklink is probably more advanced than mklink, everything that has x in front is more advanced.

    copy (simple) -> xcopy (advanced)
      My Computer


  10. Posts : 232
    Win 10 Ver 1903
    Thread Starter
       #10

    OK. I have been testing. Sorry it took so long. So far, I cannot get mklink to work as needed. Regardless of the elevated command prompt. It could be the way i am testing though. I am running this on local disk D: With two folders one labeled "IN" the other "OUT"

    Should this be OK? It is pretty much how i need it to work. I am still looking at variable to see what I am missing. If it worked for you it should work for me.

    Since what i need would not involve any extra drive mapping (there are already too many mapped drives on the real system) I need to do this using the layout as stated. Is it possible to tweak the script using D:\IN and D:\OUT ?
      My Computer


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

© Designer Media Ltd
All times are GMT -5. The time now is 04:33.
Find Us




Windows 10 Forums