Multi-user Tags and Comments

Features wanted...
PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Multi-user Tags and Comments

Post by PeterH »

Is there a lack of logic (or naming)?

Code: Select all

    + SCs listfolder enhanced: The "filesonly" argument is now called
      "flags" and has additional binary values that can be summed up
      (bitwise OR-ed) as desired.
      Syntax: listfolder([path=<curpath>], [pattern=*], [flags], _
                  [separator="|"])
        flags: (binary field)
          0: show folders and files, return full paths [default]
          1: show only files
          2: show only folders
          4: return the names without paths
If 1 shows files and 2 shows folders - shouldn't 3 show list+folders?
(And 0 show neither!)

If it would be named
1: don't show (=suppress) folders
2: don't show (=suppress) files :arrow:
3: would suppress all, and 0 show all - as it seems to be coded now
Win11 Pro 223H2 Gerrman

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

PeterH wrote:Is there a lack of logic (or naming)?

Code: Select all

    + SCs listfolder enhanced: The "filesonly" argument is now called
      "flags" and has additional binary values that can be summed up
      (bitwise OR-ed) as desired.
      Syntax: listfolder([path=<curpath>], [pattern=*], [flags], _
                  [separator="|"])
        flags: (binary field)
          0: show folders and files, return full paths [default]
          1: show only files
          2: show only folders
          4: return the names without paths
If 1 shows files and 2 shows folders - shouldn't 3 show list+folders?
(And 0 show neither!)

If it would be named
1: don't show (=suppress) folders
2: don't show (=suppress) files :arrow:
3: would suppress all, and 0 show all - as it seems to be coded now
Yes, 3 works as well for "show folders and files". I kept 0 for backward compatibility.

"suppress all" would not be extremely useful... :wink:

PeterH
Posts: 2785
Joined: 21 Nov 2005 20:39
Location: Germany

Re: Multi-user Tags and Comments

Post by PeterH »

admin wrote:"suppress all" would not be extremely useful... :wink:
Sure :D
But that's normal: not every logical combination must be useful :roll:
admin wrote:Yes, 3 works as well for "show folders and files". I kept 0 for backward compatibility.
A half OK for that: if 3 does show both, it's correct for the or-interpretation of "show ...", i.e. "show both". But still or-ing 2 times "not show" would mean show nothing...

So for reaching your desired compatibility it would have been better to come from the suppress-side of life?
0 = suppress nothing
1 = suppress a
2 = suppress b
3 = not extremely useful :D but logical in its meaning.

And, not fitting very bad with this:
4 = suppress path 8)
Win11 Pro 223H2 Gerrman

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

PeterH wrote:
admin wrote:"suppress all" would not be extremely useful... :wink:
Sure :D
But that's normal: not every logical combination must be useful :roll:
admin wrote:Yes, 3 works as well for "show folders and files". I kept 0 for backward compatibility.
A half OK for that: if 3 does show both, it's correct for the or-interpretation of "show ...", i.e. "show both". But still or-ing 2 times "not show" would mean show nothing...

So for reaching your desired compatibility it would have been better to come from the suppress-side of life?
0 = suppress nothing
1 = suppress a
2 = suppress b
3 = not extremely useful :D but logical in its meaning.

And, not fitting very bad with this:
4 = suppress path 8)
Yes, looks good. I'll think about it...

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Multi-user Tags and Comments

Post by Stefan »

Bump :)

How about an recursive list of subfolders?
Stefan wrote:This leads me to some questions:
..
2) Will recursive option come next?
..
Like:
listfolder([path=<curpath>], [pattern=*], [flags], [separator="|"], [recursive=0])


or:
$FolderList = folderreport(type="dirs", "r", "C:\Temp", "r")

Type: dirs: recursive list of all subfolders


Result:
C:\Temp\A
C:\Temp\B
C:\Temp\B\1
C:\Temp\C
C:\Temp\C\1
C:\Temp\C\2
...


Use example:
For Each Folder In $FolderList

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

Stefan wrote:$FolderList = folderreport(type="dirs", "r", "C:\Temp", "r")

Type: dirs: recursive list of all subfolders
Good idea, done!

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Multi-user Tags and Comments

Post by Stefan »

admin wrote:
Stefan wrote:$FolderList = folderreport(type="dirs", "r", "C:\Temp", "r")

Type: dirs: recursive list of all subfolders
Good idea, done!

Code: Select all

v9.90.0205 - 2011-02-04 12:38
    * SC folderreport enhanced:
        type:
          dirs: List of subfolders (like a flat Tree structure).
Thank You. Works fast and nearly as expected.



But i wonder why the order of the items are different from list preview:

Example

list preview of XY and WinEx:

Code: Select all

C:\Temp\_kunde
C:\Temp\adag

C:\Temp\aktuelle
C:\Temp\aktuelle VirenDefs

C:\Temp\FileGen
C:\Temp\FileGen1
C:\Temp\FileGen2
folderreport() output:

Code: Select all

C:\Temp\adag
C:\Temp\_kunde

C:\Temp\aktuelle VirenDefs
C:\Temp\aktuelle

C:\Temp\FileGen1
C:\Temp\FileGen2
C:\Temp\FileGen

Kind of "natural sorting" setting? (This is XP SP3)

.

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

Complex reasons:

This case was a bug. I just fixed it:
C:\Temp\adag
C:\Temp\_kunde

The other cases are a combination of the fact that "1" < "\" < "a" and probably some pecularities of the API used for natural sorting. Cannot be fixed.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Multi-user Tags and Comments

Post by Stefan »

Code: Select all

v9.90.0206 - 2011-02-04 19:10
    ! Folder Reports: Minor sorting bug since v9.90.0204. Fixed.
admin wrote:Complex reasons:

This case was a bug. I just fixed it:
Fix confirmed. Thank you.
The other cases .... Cannot be fixed.
OK, thanks.
(I can't really understand because XY can sort "correct" but not folderreport() ? Anyway thanks for checking ;-) )


--------------------


Just as example, an (working) test code with folderreport("dirs",:

For Each Folder In Folders Do

Code: Select all

$FolderList = "C:\Temp<crlf>" . folderreport("dirs", "r", "C:\Temp", "r"); 
//have to add the top-most folder to the report my own


  $LOOP=1;
  $ARRAY="";
  $Find="";


  while(true)
  {
   
    $Fold = gettoken($FolderList, $LOOP, "<crlf>");
    If ($Fold==""){break;}
    If ($LOOP > 100){break;} //limited for test only
    
     
    //do something for each folder, f.ex.:
    // msg $Fold,1;
    
    
    //my example code, list all *VBS files:
    $Find =  listfolder($Fold, "*.vbs", "1", "<crlf>");
    if ($Find != "")
    {
      $ARRAY = $ARRAY . $Find . "<crlf>";
      // msg $Fold,1;
      $Find =  "";
    }
    
   
  incr $LOOP;
  If ($LOOP > 99000){break;} //just have this idea to break an infinity loop in case of coding mistake 
  }
   
  text $ARRAY;
   
   

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

What do you want to prove with your test script?

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Multi-user Tags and Comments

Post by Stefan »

admin wrote:What do you want to prove with your test script?
Just an example of an use of this commands (and just an feedback so you see we will really use what we asked for ;.) )
Thanks.


---

But i found an problem too:

Some of my "folders" under "C:\Temp" are just links to folders on an currently not present flash drive.
And for this links the command listfolder($Fold, breaks my script
and shows the "debugging step dialog" to report me that the path was not found.
I have tried IF (exists() != 2) or like this, but no success.

Question:
Is or could there be an setting to prevent such error warnings?
Like: setting "NoErrorWarnings", 1;



 

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

I don't see why IF (exists() != 2) should not work.

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Multi-user Tags and Comments

Post by Stefan »

admin wrote:I don't see why IF (exists() != 2) should not work.
I see i have not see the facts correctly and so explained wrongly. Sorry.

Fact:
"My" folder link is not an file.lnk created with "create shortcut here".
They would not be in the report anyway.

"My" folder link is (as far as i remember correctly) created with Diskmanagement > drive X as folder C:\Temp\adag


So "C:\Temp\adag" is seen as real folder (Type: File Folder) by XY, but with an small "shortcut arrow"
BTW: In TC this folder is shown with an big "shortcut arrow"-icon and Type: <LINK>


Test:
::echo exists("C:\temp\adag"); //> 2


MAYBE extend exists()
return:
0 = does not exist
1 = exists (file)
2 = exists (folder; drive; share; server)
3 = exists (link)

admin
Site Admin
Posts: 60588
Joined: 22 May 2004 16:48
Location: Win8.1 @100%, Win10 @100%
Contact:

Re: Multi-user Tags and Comments

Post by admin »

Is it a junction?

Stefan
Posts: 1360
Joined: 18 Nov 2008 21:47
Location: Europe

Re: Multi-user Tags and Comments

Post by Stefan »

admin wrote:Is it a junction?
I think yes.


I don't know how to check this, so i ask google:

http://en.wikipedia.org/wiki/NTFS_junct ... [quote]The dir command in Windows 2000 or later recognizes junction points,
displaying <JUNCTION> instead of <DIR> in directory listings
(use dir with the /A or /AL command-line switch).[/quote]

TEST
>dir /AD
or
>dir /ADL
C:\Temp>dir /AD
Datenträger in Laufwerk C: ist SYSTEM
Volumeseriennummer: 1234-5678

Verzeichnis von C:\Temp

09.02.2011 10:11 <DIR> .
09.02.2011 10:11 <DIR> ..
06.01.2010 10:30 <VERBINDUNG> adag
04.06.2010 06:48 <DIR> aktuelle
11.05.2010 15:00 <DIR> aktuelle VirenDefs
06.01.2010 14:47 <VERBINDUNG> cdag
21.05.2010 12:03 <DIR> FileGen
21.05.2010 12:03 <DIR> FileGen1
04.02.2011 13:05 <DIR> FileGen2

second test

Code: Select all

H:\a\Sysinternals>junction.exe c:\temp\adag

Junction v1.05 - Windows junction creator and reparse point viewer
Copyright (C) 2000-2007 Mark Russinovich
Systems Internals - http://www.sysinternals.com

c:\temp\adag: MOUNT POINT
   Substitute Name: Volume{007807e3-f90d-11de-b292-005056c00008}\


Test 3

XYplorer help > find "junction"

Code: Select all

The context menu of Junctions 
has a special submenu Junction Target with these extra commands:

       Go to Junction Target
       Copy Junction Target Name
Copy Junction Target Name >>> Volume{007807e3-f90d-11de-b292-005056c00008}
So yes, it is an junction.


.
Last edited by Stefan on 09 Feb 2011 15:01, edited 1 time in total.

Post Reply