About Selecting

Than anchor for kindly repling.
I Used the Help-file: search for 'Select' -> 'Select - Raw Command' and found many options I need,
But I didnt know how to fix these (I really need it cause i always work with a lot of files):
1.Select/deselect all the files under a same path, it will be useful when you work in FLATVIEW mode
2. Deselect all files with a same extention

PS
How does "reselect" works, i trie to select a file, and then deselct it, and use the "reselect", but nothing happened.

1. Did you read this post: [Is there a command to select the contents of a Dir?) Or do you want to do something different?
2. This works for me (for example): Select DESELECT *.bmp
3. Your code must be: SELECT reselect (not only RESELECT)

quote="zhgwangff"
1.Select/deselect all the files under a same path, it will be useful when you work in FLATVIEW mode
[/quote]

<?xml version="1.0"?> <button backcol="none" display="label" textcol="none" type="three_button"> <label>Select Files</label> <icon1>#newcommand</icon1> <button backcol="none" display="label" textcol="none"> <label>Select Files</label> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Select ALLFILES </instruction> </function> </button> <button backcol="none" display="label" textcol="none"> <label>Deselect</label> <icon1>#newcommand</icon1> <function type="normal"> <instruction>Select NONE </instruction> </function> </button> </button>

@Set Pat = {RS|Enter your selecting pattern} SELECT PATTERN={$Pat} TYPE=files MAKEVISIBLE

[quote="zhgwangff"]
How does "reselect" works, i trie to select a file, and then deselct it, and use the "reselect", but nothing happened.[/quote]

As far as I know, Reselect will worked if a file is deselected by DOpus. For example, when you select some files and click on Copy command, copyed files are deselected automatically. Now if you enter Reselect command, unselected files/folders will be selected again (However, some times this command will not work without any reason :wink: )

Question 2 button code:

@nofilenamequoting @set extension={dlgstringS|Enter extension|txt} Select DESELECT "*.{$extension}"

This button asks you to enter the extension and then deselects all the files with the extension you entered ...

My answer was at the same time as Christiaan. Now after reading his letter, I think your need was not be understood right by me. So I must have some supplementary comment:

  1. The first code will select/deselect all files in the same lister, not the same path.

  2. the second code will select all the files with the same extension. For deselecting files with the same extension use the following code:

@Set Pat = {RS|Enter your selected pattern} SELECT DESELECT PATTERN={$Pat} TYPE=files MAKEVISIBLE

:laughing: Again in sync with Christiaan :laughing:

What a mess ... but two answers is better than no answer at all :wink:

Thank you very much for your kindly answer,
so these are mission imposible for Dopus now, I hope see it as soon as posible.

[quote="zhgwangff"]Thank you very much for your kindly answer,
so these are mission imposible for Dopus now, I hope see it as soon as posible.[/quote]
You got two answers for the "deselect all files with a same extension" one so that one is possible at least.

I don't know if the flat-view path select/deselect one is possible, though. I vaguely remember filing a feature request along those lines recently but I might be thinking of something slightly different. For now I would resort to range (de)selection using the mouse. Or use the Find Panel instead of Flat View, in which case you can refine your search criteria to exclude certain folders and then re-run the Find.

[quote="leo"][quote="zhgwangff"]Thank you very much for your kindly answer,
so these are mission imposible for Dopus now, I hope see it as soon as posible.[/quote]
You got two answers for the "deselect all files with a same extension" one so that one is possible at least.

I don't know if the flat-view path select/deselect one is possible, though. I vaguely remember filing a feature request along those lines recently but I might be thinking of something slightly different. For now I would resort to range (de)selection using the mouse. Or use the Find Panel instead of Flat View, in which case you can refine your search criteria to exclude certain folders and then re-run the Find.[/quote]

what i exactly need is: i.e. you have all files selected, and you want to deselect all *.doc files. I know you can use the command "deselect *.doc" itself, but it would be better, if just deselect anyone of the *.doc files ,and then press a command "deselect all files with the same extention of the deselected file", espesially in case when you need deselect several kinds of files at a same time.

What's wrong with something like what Christiaan suggested?

Select DESELECT "*.{dlgstring|Enter extension to deselect}"

With that you click the button, type doc and hit return. It would then deselect all .doc files.

Found a way to do it without a dialog !!!

Step 1: deselect a file (for example with the extension .bmp)

Step 2: Click this button:

Select INVERT Select PATTERN *{f|ext} Select INVERT

Now, all files with the same extension will be deselected 'automatically'.

@ Leo: Why doesn't this work:

Select Invert
Select SIMILAR
select invert

[quote="Christiaan"]Found a way to do it without a dialog !!!

Step 1: deselect a file (for example with the extension .bmp)

Step 2: Click this button:

Select INVERT Select PATTERN *{f|ext} Select INVERT

Now, all files with the same extension will be deselected 'automatically'.[/quote]

Its just wonderful, how did you think it out? Thank you very much

[quote="Christiaan"]Select INVERT
Select PATTERN *{f|ext}
Select INVERT[/quote]
For me that seems to deselect everything no matter what is selected/deselected to start with.

I tried this several times! It works perfectly here ... :confused: This is exactly what zhgwangff and I are doing:

Select everything (CTRL-A) -> Deselect one file (for example picture.bmp) -> click my button:
It inverts the selection -> picture.bmp is selected -> it selects every file with the extension .bmp ->
it inverts the selection -> all the .bmp files are deselected (and all the other files are selected) ...

But, as i mentioned above, the code with Select SIMILAR doesn't work, i don't know why.
That's why i used Select PATTERN *{f|ext}

See also: [Select all files matching selected file's extension)

That button only works the way you intend if there are no folders at the top of the list - perhaps that's why it doesn't work for Leo.

Ah, seems like the button has two problems which affected both of the folders I tested it in:

  1. If there are any folders then everything is deselected (as Steve just said).

  2. If there are no folders, but only one type of file, then everything is deselected even if everything was selected to start with.

quote="Christiaan"
@ Leo: Why doesn't this work:

Select Invert
Select SIMILAR
select invert[/quote]

I think this is another bug in Select command. Check the follow code instead:

Select Invert
dopusrt /cmd Select SIMILAR
select invert

[quote="leo"]1) If there are any folders then everything is deselected (as Steve just said).
[/quote]

Really no problem here! Tested it again, very strange ... :confused:

Do you mean, for example, a folder with only .doc files? When you select all the .doc files, deselect one of them and click the button, OF COURSE everything is deselected (the button should do that: it deselects all the .doc files and there are only .doc files). But: the button isn't useful in that situation! If you want to deselect all the .doc files in a folder with only .doc files, just deselect them ...

My 1st problem:

Since {f|ext} turns into an empty string for folders (or files for that matter; anything with no . in its name), won't you end up running this:

[ul][li]Select INVERT[/li]
[li]Select PATTERN *[/li]
[li](maybe select some other things as well, but everything is already selected at this point)[/li]
[li]Select INVERT[/li][/ul]

So that will select everything and then invert the selection, in effect deselecting everything.

BTW, are you using a normal button type, or is it an MS-DOS button or something? Maybe that is a factor.

My 2nd problem:

I'm not deselecting any of them.

I have a folder with only .doc files and they are all selected. I click the button the result is that they are all deselected.

I don't know exactly what's going on or why you see different results to me, though.