Hi
I use finder in list view and often I must copy files from folder A to sub folder inside folder B but in finder, I must open the subfolder in B to copy inside.
For example, I would like to copy "test.xml" inside folder A to folder B1 without having to open it.
Is there a way without simulate keyboard press ? Maybe with AppleScript ?
Are the names exactly "Folder A" and "Folder B1" all the time or can they change to other names? And if they can change, how do you expect KM or AppleScript to know what the intended names are?
But if they can both change, and you are selecting only one folder at a time, how do you get BOTH names passed to a macro? You have to come up with some way of telling the macro the paths of both the source and destination.
You also have to come up with some way to trigger the macro. You said a hotkey was not acceptable. Why not? What's the problem with a hotkey?
Copy file to folder B1 without opening it (with keyboard maestro)
I could make a macro to open selected folder (cmd + o), copy the file (cmd + v) and go back.
However, I would like to know if there's another way, maybe better, to do this.
After reading your posts for 15 minutes, I think I finally understand. The key idea is that you said "without opening it". I was probably confusing "opening the file" with "opening/expanding the folder name in list view." Yes, I can confirm that if you don't open the destination folder, the file won't be copied there.
This is a behaviour of Finder. I'm not sure that KM can change how Finder works. KM can't really change how any application works.
However there may be some creative ways to solve this. For example, we could create a macro for you that lets you specify the destination folder, rather than using Finder to specify it. Then we would also create a macro that uses a hotkey to copy all the selected files in the current folder to whatever destination folder you specified in the other macro. I think that would work for you. What do you think? Have I understood the issue now?
If I'm correct, the solution is fairly short and sweet, but I'm not sure I can write it for you today, due to running out of time.
Thanks for your help and for taking the time to understand
I like your idea but I'm affraid that it takes much time to select the right folder in KM popup than open the folder in finder and go back. Or maybe I don't see how it's work in the end.
You have to do this only once, then you never have to do it again until you decide to change the folder. So I don't think this will "take time" at all.
Assuming you copy a file and then select the closed folder in the Finder, this Macro will paste the file into the folder without you having to open that selected folder. (It opens the folder, pastes and then closes the folder.)
Here's a fun variant that let's you select one or more files and folders in the Finder, run the macro, select a destination folder (again in the Finder) and the files will be copied for you:
Easy to tweak it to how you want -- for example, you have it "Pause Until" you hit a certain key so that you could use your mouse to work through folders until you had the destination selected.
No, I think you have to go through the Finder for that. I did have a go, striping the Clipboard to only the public.file-url flavour, but that breaks as soon as you have multiple items copied.
If you change my macro above so that instead of pausing until the Finder selection changes it pauses until a key is pressed -- Return, for example -- then you can select files, run the macro, navigate around in the Finder and, when you've finally found and selected the destination folder, you hit Return and the files are copied to the selected folder.
You can even use modifier keys in the "Pause Until" condition -- maybe use Option-Return:
...so you can still use Return when creating/renaming a folder while the macro is running.