An icon shortcut for a BAT file - executing code on content of the active tab?

Discussion, questions and support.
Post Reply
Message
Author
User avatar
Forez
Posts: 1312
Joined: 30.01.2016, 12:05
Location: In front of a PC monitor

An icon shortcut for a BAT file - executing code on content of the active tab?

#1 Post by Forez » 27.02.2018, 00:50

Is it somehow possible do such a thing in FreeCommnader:

You are in a folder, you navigate mouse pointer to some shortcut and there it goes- a BAT file executes itself in that current location?

For example you want to delete all WAV files. So instead of
A] finding and selecting them completely manually
B] finding them by means of changing the sort order to that by type of content [extensions]
C] filtering the list with Quick Filter
D] pressing CTRL + F
you just have a BAT that deletes all WAV files in the current folder that it is executed in - and so you just click it and FC somehow tells that BAT what that current folder is [the currently active tab]?

Is it possible or is it a feature that would have to be pre-implemented first?

Karol
Posts: 963
Joined: 19.08.2007, 12:05

Re: An icon shortcut for a BAT file - executing code on content of the active tab?

#2 Post by Karol » 27.02.2018, 08:16

I make it so if the file is in view:
- select the file
- select all files with same extension (Alt++)
- delete all files (Del)

If the file is not in view
- select files dialog (+)
- delete all files (Del)

User avatar
Forez
Posts: 1312
Joined: 30.01.2016, 12:05
Location: In front of a PC monitor

Re: An icon shortcut for a BAT file - executing code on content of the active tab?

#3 Post by Forez » 27.02.2018, 21:27

If I have to select files in any way or filter the view, then there is only small additional gain by having an icon that would then delete from selected files those that meet the requirements [specified in the BAT file]. I want to save as many clicks and time I can

So unless I have such a BAT as an icon [thus being able to just point and click], that ALT++ way of selection will do the trick. It will be much more efficient than my current methods and only a little lesser than a solution of just hitting an icon from a Favorite Toolbar. And I can use ALT++ not only everywhere but also on every format, without the need to pre-list it in the BAT file


So thank you for sharing your knowledge

User avatar
Forez
Posts: 1312
Joined: 30.01.2016, 12:05
Location: In front of a PC monitor

Re: An icon shortcut for a BAT file - executing code on content of the active tab?

#4 Post by Forez » 22.06.2018, 14:14

I finally managed to come up with almost the exact answer to my problem; and a second half-measure


1] The Splitter can hold icons with predefined quick filters. These simple filters [like for example "*.WAV"] can be predefined under the

Tool > Settings > Quick Search / Filter / Starter > Quick Filter > Predefined Quick Filters

But I still have to one way or another execute the deletion of files narrowed down by such quick search


2] Icon on a Favorite Toolbar can lead via its "Program or folder" box to a BAT file, which will have for example such a code

Code: Select all

del M:\Mus\*.WAV /s
del "M:\New Music\"*.WAV /s
exit
And as a fail safe, the user can also hide shortcut to that BAT under a category, so that the BAT cannot be clicked by accident- the user has to first click the icon for category and only then can the icon for that BAT be clicked [when chosen beneath the category icon from a drop down list]



I prefer the second method, as it requires only 1 or 2 clicks and can cover all of my drives- although it has a quite big down side: the deleted files do not go to the Recycle Bin; so there is no quick / easy way of reversing a mistake

Post Reply

Who is online

Users browsing this forum: No registered users and 21 guests