Author Topic: Create Folder (On Target) Bug?  (Read 17969 times)

blitz999

  • Newbie
  • *
  • Posts: 7
    • View Profile
Create Folder (On Target) Bug?
« on: October 16, 2016, 01:14:34 »
I have created a user command using create folder (on target) to automatically insert the current filename in the create folder dialog box. I am running mc on win7 sp1, and I have mc split horizontally.
When I execute the command the current filename is inserted into the create folder dialog box, but when I click OK, the folder is created in the Opposite explorer panel! So, if I select a file in the LOWER panel the folder is created in the UPPER panel (and the same thing happens in reverse). The same thing happens whether the explorer panel layout is horizontal or vertical.
There are no other options available in this command, so I'm stumped as to how to get around this.

Thanks in advance.

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Re: Create Folder (On Target) Bug?
« Reply #1 on: October 17, 2016, 16:54:25 »
That all makes perfect sense:  "Target" is the "other" panel (the one without focus).

You cannot create a folder with the same name as a file (under the current path) in any Windows operating system - it is simply not allowed.

blitz999

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Create Folder (On Target) Bug?
« Reply #2 on: October 17, 2016, 18:22:26 »
@Alan

Thanks for your  reply.  You are correct. I should have mentioned in my initial post, that I thought of this and tried changing the name to see if that would make a difference, but it didn't. Once I executed the command, the filename I used was irrelevant, and the folder was always created in the opposite panel.

Are you saying  that this is not a bug, and even thought the command will copy the current filename into the create folder dialog, the structure of the program will never let me create the folder (even with a modified folder name) in the same panel (drive) in which the file was selected.

This can be done in Total Commander. If  you select a file and hit the make folder button, it inserts the filename in the dialog  minus the extension (which MC does not), so there is no conflict with Windows, and it creates the folder in the same panel (drive) as the file. 

It would seem that the whole purpose of this command is to create a folder in the same panel (drive) as the file you selected, so that you could then move the file into that folder on the same drive as the original file ???

Any word from MC's  developer would be helpful.

Thanks.
« Last Edit: October 17, 2016, 23:18:27 by blitz999 »

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Create Folder (On Target) Bug?
« Reply #3 on: October 18, 2016, 07:16:24 »
Since you are not providing what your user defined command is doing it is hard to say if you are doing anything wrong or not, and what that is.
It depends on what you are doing and what command you use.
Normally all direct commands are sent to the panel in focus.

blitz999

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Create Folder (On Target) Bug?
« Reply #4 on: October 18, 2016, 12:15:34 »
Mathias,
Thanks for your response. Here is a screen shot of the 'User Command' that I created.

Hope this helps.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Create Folder (On Target) Bug?
« Reply #5 on: October 18, 2016, 14:51:51 »
Ahh you calling a an internal command.

Well that is correct..  that command will create folder on target.. and the target panel is the opposite panel..
You want the one that does NOT say "On target", that will create them in the source panel (the active panel)

blitz999

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Create Folder (On Target) Bug?
« Reply #6 on: October 18, 2016, 22:55:01 »
Mathias,

When I do not use the (On Target) folder creation command, the folder is crated in the current panel BUT the filename that I selected is not inserted into the dialog box.

I have found a work abound that might be useful to others:

1. I created a user user command, using these parameters: Internal Commands > Explorer Panel > Files/Folders name.

2. I went to: Explorer Panel Settings > Mouse configurations > Custom mouse command #1; and selected the Files/Folders name User Command.

3. I went to: Explorer Panel Settings > Mouse configurations > Left mouse button > Click; and selected Custom mouse command #1.

4. I created a user command, using these parameters: Internal Commands > Explorer Panel > Create folder (From clipboard text). This command creates a new folder in the current panel.

Now I can single left click on a file, and the hit the Create folder (From clipboard text) button, and the dialog box with the current filename is copied from the clipboard and all I have to do is remove the file name's extension, and the folder is created in the current panel.

Maybe in the future you could tweak the program to not copy the file extension into the create folder dialog box  ;)

I have attached screen shots.

Thanks.
 
« Last Edit: October 19, 2016, 01:25:58 by blitz999 »

AlanJB

  • VIP Member
  • *****
  • Posts: 436
  • VERY old Programmer
    • View Profile
Re: Create Folder (On Target) Bug?
« Reply #7 on: October 18, 2016, 23:51:58 »
I, for one, am confused.

Are you saying you were able, using your two commands, to create a folder with the same name as an existing file in the same path ?!

blitz999

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Create Folder (On Target) Bug?
« Reply #8 on: October 19, 2016, 01:23:35 »
@AlanJB,

Don't forget, I also had to create those mouse commands as well. And as I mentioned, the copy File/Folder command copies the entire filename (with extension) to the clipboard, so when I execute the 'Create Folder from Clipboard Text' command, I manually remove the file extension from filename in the dialog box.

Total Commander does all of this in one step. You select a file and hit the make folder button and TC automatically inserts the filename (minus the extension) in the dialog box, and creates the folder in the active panel. I was trying to re-create this function in MC, but this is the closest I could get to it without learning Multi Script.

Hope this helps.

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4416
    • View Profile
    • Multi Commander
Re: Create Folder (On Target) Bug?
« Reply #9 on: October 19, 2016, 07:36:39 »
Mathias,

When I do not use the (On Target) folder creation command, the folder is crated in the current panel BUT the filename that I selected is not inserted into the dialog box.

I have found a work abound that might be useful to others:

1. I created a user user command, using these parameters: Internal Commands > Explorer Panel > Files/Folders name.

2. I went to: Explorer Panel Settings > Mouse configurations > Custom mouse command #1; and selected the Files/Folders name User Command.

3. I went to: Explorer Panel Settings > Mouse configurations > Left mouse button > Click; and selected Custom mouse command #1.

4. I created a user command, using these parameters: Internal Commands > Explorer Panel > Create folder (From clipboard text). This command creates a new folder in the current panel.

Now I can single left click on a file, and the hit the Create folder (From clipboard text) button, and the dialog box with the current filename is copied from the clipboard and all I have to do is remove the file name's extension, and the folder is created in the current panel.

Maybe in the future you could tweak the program to not copy the file extension into the create folder dialog box  ;)

I have attached screen shots.

Thanks.

The problem is that you are trying to using internal commands for custom behaviour.

Makedir On Target is the internal command for Ctrl+F7  (That folder on target with name of focus file from source preset)
If you want to customize what should be preset in the makedir dialog. Then you need to use custom command or MultiScript

Code: [Select]
MC.Explorer.Makedir FOLDERNAME="MyName"
If you want to script exactly what the preset name should be. Youy will probably need MultiScript that calls the customcommand when it build the name you want to use.