This folder (Community_full2) contains only links to other folders.
Now I want to move "Community_full2" to another place.
But presently, when doing so, the move/copy operation copies also all the linked data to the destination folder and as a consequence, my copied/moved "Community_full2" folder contains directly all the linked data (all these data have been copied inside the "Community_full2" and there no more links in the copied "Community_full2")
So, how to copy/move such a folder like "Community_full2" and keep all the links untouched inside this folder as they are at the origin?
If it's only a small number of folders, I would just create new links in the new location.
If you need to do it more often or for a lot of folders, I'd create a button or hotkey in Opus which runs robocopy.exe with the /SJ and /SL arguments (which make it copy junctions and links as junctions and links, rather than copy their contents):
Hi,
Thank you for the solution.
Could i add this as a command in the contextual menu?
What are the « noterm » options?
Could i make it work using the two panels of directory opus?
Is robocopy a standard tool of windows?
Thanks.
Patrice.
Adding it to the file display background menu would make most sense, since it works on the current folder (not the selected or right-clicked folders or anything like that). You can edit that via Settings > Customize > Context Menus > Lister Context.
They prevent a \ being added to the end of folder paths. Search for "noterm" in the manual for full details.
That's what it already does. {sourcepath} is the source folder and {destpath} is the destination folder in a dual-pane window.
Yes, it should always be there (unless you go back to the Windows 95 era).
I set this in the context menu related to files and folders and it does not work. Nothing is copied.
But when I use robocopy using a command prompt under windows, it works ok, but I must run with administrative rights for it to work.
The command that works under windows is
« Robocopy source_dir dest_dir, /e /sl /sj »
What I have done in dopus:
In file types, all folders and files, I access the context menu tab, edit, add a new entry as « copy links » and as content I choose run an application
And then I add the above command line, but using sourcepath$ and destpath$ as folders, but nothing happens when executing the new entry of the context menu.
I tried:
{Sourcepath$} {destpath$} >> ko
{Sourcepath$|noterm} {destpath$|noterm} >> ko
{Allfilepath$} {destpath$} >> ko
Hi again Leo,
I have nevertheless a problem. Using allfilepath$ selector of items to robocopy.
Suppose I have the folder "c:\origin" that contains folders "orig1" "orig2" "orig3" that contain links.
"orig2" contains links link1 link2 link3
I display "origin" folder as source in dopus.
I create a "dest" directory and set it as dest folder in dopus.
Now, I select "Orig2" and I want to copy it to "dest"
I use the command @admin
robocopy.exe {allfilepath$|noterm} {destpath$|noterm} /E /SL /SJ
The result is that under "dest" directory, I have the content of "orig2", but not the folder "orig2"
I have link1 Link2 Link3 directly under folder "dest"
So source structure is like this
Origin
-----orig1
-----orig2
----------link1
----------link2
----------link3
-----orig3
Dest structure after robocopy of orig2 using the above command
Dest
-----link1
-----link2
-----link3
Dest structure I would like to be after robocopy of orig2
Dest
-----orig2
----------link1
----------link2
----------link3
How to solve this?
If I use "sourcepath$" instead of "Allfilepath$", it works ok, but it copies all folders under "origin" and I do not want this.
Thanks.
That copies things that aren't even selected, so I'm guessing the File(s) to copy part really means files and not folders, or something. I'm not a Robocopy expert, though.
You can get what you want by running it once per selected item (which Opus will do for you automatically):