Selection order
Moderators: Hacker, petermad, Stefan2, white
Selection order
I'm frequently using a vbs script which join multiple pdf files to a single file (by using some command line pdf tools). I attached the script to a button with parameters %Q%P%S.
My problem is about the file list order which are sent to the script (same as the one in the panel). I need to send the files in a custom order (e.g., selection order in the panel).
Is there any way to do it?
A new special character for user's file (and/or dir) selection order could be helpfull (For example %C%Q%P%S). But, there isn't as I know.
Regards
My problem is about the file list order which are sent to the script (same as the one in the panel). I need to send the files in a custom order (e.g., selection order in the panel).
Is there any way to do it?
A new special character for user's file (and/or dir) selection order could be helpfull (For example %C%Q%P%S). But, there isn't as I know.
Regards
Re: Selection order
As a workaround you could create a custom column for [=tc.comment] and sort by this column. Then put order number in the comment for each file. The files will be sorted on the fly. When you are done, mark the files and run your script.HBB wrote:I'm frequently using a vbs script which join multiple pdf files to a single file (by using some command line pdf tools). I attached the script to a button with parameters %Q%P%S.
My problem is about the file list order which are sent to the script (same as the one in the panel). I need to send the files in a custom order (e.g., selection order in the panel).
Is there any way to do it?
BTW. You mention you use %Q. If have seen a suggestion for %Q on the forum, but it has not been implemented, has it?
White wrote:
meisl wrote:
For example, I marked the files in the following order:
1) Cover.pdf 2) Index.pdf 3) Body.pdf 4) Attachments.pdf
Normally %Q character for the button bar parameters does not sense this order and send the parameters to the script as follows (if the source panel is set to view files in alphabetic order):
1) Attachments.pdf 2) Body.pdf 3) Cover.pdf 4) Index.pdf
I want to sent the files in a order as I selected.
White wrote:
Currently, I solve the problem by adding some numbers to beginning of file names. But, this is not good way. Especially, if I need to add a new file, to change numbers take time. Some times, I have a tons of drawing files which should be joined.
I knew the TC's Comments may help as you described. Because of the problems to backup descript.ion files, currently I don't prefer it (even if I know that it is very usefull). Maybe later.As a workaround you could create a custom column for [=tc.comment] and sort by this column. Then put order number in the comment for each file. The files will be sorted on the fly. When you are done, mark the files and run your script.
meisl wrote:
What I mean "User's selection order" is the file selection sequence in the source panel with mouse right-button click or space/ins key by user (or marking or highlighting or whatever it is).Could you expand on what exactly you mean by "selection order"?
For example, I marked the files in the following order:
1) Cover.pdf 2) Index.pdf 3) Body.pdf 4) Attachments.pdf
Normally %Q character for the button bar parameters does not sense this order and send the parameters to the script as follows (if the source panel is set to view files in alphabetic order):
1) Attachments.pdf 2) Body.pdf 3) Cover.pdf 4) Index.pdf
I want to sent the files in a order as I selected.
White wrote:
In fact, I don't have any suggestion about %Q. I said only an additional new letter (e.g. %C) which may sort the files in user's selection order in panel. This is a suggestion (which is not regularly suggested yet).You mention you use %Q. I have seen a suggestion for %Q on the forum, but it has not been implemented, has it?
Currently, I solve the problem by adding some numbers to beginning of file names. But, this is not good way. Especially, if I need to add a new file, to change numbers take time. Some times, I have a tons of drawing files which should be joined.
I see. It would be nice if you could use files.bbs and descript.ion at the same time. The internal content plugin "tc" could be expanded with tc.comment1 (comment from files.bbs) and tc.comment2 (comment from descript.ion). Or perhaps using a modifier, for example: tc.comment.filesbss and tc.comment.description.HBB wrote:I knew the TC's Comments may help as you described. Because of the problems to backup descript.ion files, currently I don't prefer it (even if I know that it is very usefull). Maybe later.As a workaround you could create a custom column for [=tc.comment] and sort by this column. Then put order number in the comment for each file. The files will be sorted on the fly. When you are done, mark the files and run your script.
A new command "cm_SwitchCommentFile" may be useful too.
Above you say that %Q sends file names to the script, but %Q does not do anything..HBB wrote:White wrote:In fact, I don't have any suggestion about %Q. I said only an additional new letter (e.g. %C) which may sort the files in user's selection order in panel. This is a suggestion (which is not regularly suggested yet).You mention you use %Q. I have seen a suggestion for %Q on the forum, but it has not been implemented, has it?
I don't see why it should take much time when using a good renaming scheme in the multi-rename tool. Do you know that in the multi-rename tool you can sort the list, drag around lines in the list and even delete lines from the list?HBB wrote:Currently, I solve the problem by adding some numbers to beginning of file names. But, this is not good way. Especially, if I need to add a new file, to change numbers take time. Some times, I have a tons of drawing files which should be joined.
- I know renaming tool very well and I already use it. Yes it helps a little bit.
- You are right about %Q, this is my mistake. %P%S is enough to send multiple files to the script. But, it does not effect my suggestion.
- I agree with you about using the comments. It could help a lot especially by using both descript.ion and files.bbs.
What do you think about my suggestion? Doesn't it solve the problem completely. By this way, there is no need to any other sorting in the panel. Just selecting the files in the desired order, then pressing a button. Finished... This feature may help for some other cases. E.g., to open files in a custom order (pictures, musics, movies, etc.)
What does Author think about this suggestion. Is it possible?
- You are right about %Q, this is my mistake. %P%S is enough to send multiple files to the script. But, it does not effect my suggestion.
- I agree with you about using the comments. It could help a lot especially by using both descript.ion and files.bbs.
What do you think about my suggestion? Doesn't it solve the problem completely. By this way, there is no need to any other sorting in the panel. Just selecting the files in the desired order, then pressing a button. Finished... This feature may help for some other cases. E.g., to open files in a custom order (pictures, musics, movies, etc.)
What does Author think about this suggestion. Is it possible?
Are there any other really practical needs to store information about selection order? I don't see such. Is any other software able to restore selection order? I doubt.
I think that it would be much more usable for you to write two scripts (or same script with 2 modes): add selection mode and execute mode. So, you focus files and press shortcut that calls script, and it selects file in TC (for visual purpose) and adds it to list (for further command). When list is done, you launch execute mode that starts processing using already generated list with correct order.
I think that it would be much more usable for you to write two scripts (or same script with 2 modes): add selection mode and execute mode. So, you focus files and press shortcut that calls script, and it selects file in TC (for visual purpose) and adds it to list (for further command). When list is done, you launch execute mode that starts processing using already generated list with correct order.
MVV, hello.
Your suggestion is one of the solutions. But, it may have two problems.
1) Selection problem: Select a file, press a button. Select a file press a button....Then press another button to comlete it. It needs a lot off pressing a button.
2) While selection, the script should hold the file names in a file. If I get a phone and forget to clean cache and I restart the procedure again, then some problems may happen.
Your suggestion is possible, but it is dangerous a little bit.
Regards
Your suggestion is one of the solutions. But, it may have two problems.
1) Selection problem: Select a file, press a button. Select a file press a button....Then press another button to comlete it. It needs a lot off pressing a button.
2) While selection, the script should hold the file names in a file. If I get a phone and forget to clean cache and I restart the procedure again, then some problems may happen.
Your suggestion is possible, but it is dangerous a little bit.
Regards
Ctrl+Shift+Enter inserts full paths.
You can use tools that send keypresses to paste text to TC command line. E.g. TCFS2.
You can use tools that send keypresses to paste text to TC command line. E.g. TCFS2.
Yes, a bit uncomfortable, but specific procedure won't be mixed with something else. And, it is much more usable with shortcut for selecting script: click file, press shortcut, click file, press shortcut, etc. Just easy as HolgerK's idea but with better visualization (selection).1) Selection problem: Select a file, press a button. Select a file press a button....Then press another button to comlete it. It needs a lot off pressing a button.
You can easilly compare cached ordered selection with current TC unordered one and process only items that are actually selected now. Or just take last N files from selection cache where N is the number of selected files in TC (but I would prefer to compare selections anyway).2) While selection, the script should hold the file names in a file. If I get a phone and forget to clean cache and I restart the procedure again, then some problems may happen.
MVV:
MVV:
MVV and HolgerK, Very thanks for the suggestions, they were very helpfull. I will try both of them. They are more easy than the renaming files as I did.
Regards
Both yes and no. Button needs mouse use. Or, may be same difficulty... You may be right.And, it is much more usable with shortcut for selecting script: click file, press shortcut, click file, press shortcut, etc. Just easy as HolgerK's idea but with better visualization (selection).
MVV:
This may not be so easy. Additionally I need 4 buttons: Clean, Check, Select and Execute.You can easilly compare cached ordered selection with current TC unordered one and process only items that are actually selected now. Or just take last N files from selection cache where N is the number of selected files in TC (but I would prefer to compare selections anyway).
MVV and HolgerK, Very thanks for the suggestions, they were very helpfull. I will try both of them. They are more easy than the renaming files as I did.
Regards
It doesn't require mouse, you can navigate files in any way and then press shortcut.
It is enough 2 buttons/commands: 'select' and 'process'. 'Select' accumulates items and indicate selected ones with selection (it is easy to send Insert or Space keypress to TC window). When you execute 'process', it processes accumulated selection and cleans cache. And, it is not a problem with outdated cached files if you check actual selection. Finally, with no selection 'process' may simply purge the cache (which may be e.g. in temp folder).
It is enough 2 buttons/commands: 'select' and 'process'. 'Select' accumulates items and indicate selected ones with selection (it is easy to send Insert or Space keypress to TC window). When you execute 'process', it processes accumulated selection and cleans cache. And, it is not a problem with outdated cached files if you check actual selection. Finally, with no selection 'process' may simply purge the cache (which may be e.g. in temp folder).
MVV,
Assume 4 files will be processed: 1) A.pdf 2) B.pdf 3) C.pdf 4) D.pdf
Desired order: 1) C.pdf 2) B.pdf 3) D.pdf 4) A.pdf
1) Select C.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "C.pdf"
2) Select B.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "B.pdf" "C.pdf"
3) Select D.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "B.pdf" "C.pdf" "D.pdf"
4) Select A.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "A.pdf" "B.pdf" "C.pdf" "D.pdf"
For each SELECT action, in the script: the files is read from file + compared by new list + desired order is determined + writen to file again.
OK. Now, just before pressing DONE button,assume that you saw a mistake and decided to change order of files. How do you clean the cache? Do you press DONE button to clean the cache?
You wrote:
EDIT> Otherwise, it is possible to say there is no need %P%S parameters to send files cumulatively. Each time files can be selected by a button and progress can be started by an another button.
Assume 4 files will be processed: 1) A.pdf 2) B.pdf 3) C.pdf 4) D.pdf
Desired order: 1) C.pdf 2) B.pdf 3) D.pdf 4) A.pdf
1) Select C.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "C.pdf"
2) Select B.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "B.pdf" "C.pdf"
3) Select D.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "B.pdf" "C.pdf" "D.pdf"
4) Select A.pdf (highlighted by INS/SPACE key). Press SELECT button. %P%S sends: "A.pdf" "B.pdf" "C.pdf" "D.pdf"
For each SELECT action, in the script: the files is read from file + compared by new list + desired order is determined + writen to file again.
OK. Now, just before pressing DONE button,assume that you saw a mistake and decided to change order of files. How do you clean the cache? Do you press DONE button to clean the cache?
You wrote:
Answer is yes according to me. Read file + write file + compare file + clean cache + ... is not so easy than sending the files in selection order in button parameters.Are there any other really practical needs to store information about selection order?
EDIT> Otherwise, it is possible to say there is no need %P%S parameters to send files cumulatively. Each time files can be selected by a button and progress can be started by an another button.