How can i make two copy action in one button?

Hello,

I am trying to make a button with the following condition:

If you select a folder, button will creat junction of the selected folder at the destination folder:

Copy MAKELINK=junction

If you select a file, button will creat hard link of the selected file at the destination folder:

Copy MAKELINK=hardlink

I couldn't do it with one button. Could you please help?

Does Copy MAKELINK=auto do what you need?

It will create a softlink, junction or hardlink as appropriate to the version of Windows and type of object (file or folder) selected.

(On Windows 7, it will always create softlinks, but those work with both files and folders. On earlier versions of Windows it will select hardlinks for files and junctions for folders.)

Thanks leo. I know "auto" option but my OS is Windows 7 and it always create softlinks. I would like to creat hardlinks for files.

I try the following but it is not working like that:

@filesonly
Copy MAKELINK=hardlink
@dirsonly
Copy MAKELINK=junction

Is there any other way that i can make it through?

I don't think there's a good automated solution, at least that wouldn't involve calling some external VBScript tor similar to decide which command to then run.

You could make a three-button where the left-click makes junctions and the right-click makes hardlinks, if that's any use.

How come you need junctions & hardlinks specifically instead of softlinks, and what kind of thing are you doing where you need to create either so often that you need to automate the choice of which to create? If there's a strong use-case for it we might be able to make some changes.

Thank you leo, three-button is a good solution for me it didn't came to my mind somehow.

What i am trying to do is;

I am a sales person and i keep brochures, manuals, drawings etc. of our products in each seperate folder respectively. But when i prepare a proposal for customers, i creat a customer named folder for the project and put related documents in another folder to send to the customer as attachments (like brochures etc.). We have various products and attachment folders content differs from each other for each customer. I don't want to creat duplicates of each document in customer folders so i use hardlinks, junctions or softlinks for this purpose. I prefered hardlinks because two file names point only one location and you can rename, move etc. each file and changes applied to both. If you creat a softlink, it is just a shortcut to file location and if you rename or move the source file, softlink is useless.

I am still not sure which is good for me, using hardlinks or softlinks for this purpose and i am trying now softlinks for files with "Copy MAKELINK=auto" command (I need both with junctions because if it is a whole folder which i going to add, i would like it to creat a junction).

Anyway, whichever i use hardlinks or softlinks, three-button or "Copy MAKELINK=auto" meets my needs for now. But if you make some changes to add an auto hardlink/junction combination option, you are welcome :slight_smile:

Regards,

Thanks! That certainly makes sense.

I've added a Copy MAKELINK=autonosoft command which I'm testing now. That should be in a future version, assuming we don't discover any problems with it. (It probably won't be in the next update, so I hope the three-button solution is good enough for now, but we'll get it into one of the updates after that.)

This is very good news leo thank you very much.

I'm in no hurry so please take your time. Even it is good to hear it will be added soon.

Regards,

The Copy MAKELINK=autonosoft command I mentioned is now available in Opus 10.5.0.1 beta.

Thanks leo.

I updated DOpus to 10.5.0.1 beta and autonosoft works great.