Page 3 of 4
Re: Multi-user Tags and Comments
Posted: 22 Oct 2010 15:48
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
3: would
suppress all, and 0 show all - as it seems to be coded now
Re: Multi-user Tags and Comments
Posted: 22 Oct 2010 15:51
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
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...

Re: Multi-user Tags and Comments
Posted: 22 Oct 2010 17:43
by PeterH
admin wrote:"suppress all" would not be extremely useful...

Sure
But that's normal: not every logical combination must be useful
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

but logical in its meaning.
And, not fitting very bad with this:
4 = suppress path

Re: Multi-user Tags and Comments
Posted: 22 Oct 2010 17:59
by admin
PeterH wrote:admin wrote:"suppress all" would not be extremely useful...

Sure
But that's normal: not every logical combination must be useful
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

but logical in its meaning.
And, not fitting very bad with this:
4 = suppress path

Yes, looks good. I'll think about it...
Re: Multi-user Tags and Comments
Posted: 03 Feb 2011 13:20
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
Re: Multi-user Tags and Comments
Posted: 03 Feb 2011 13:56
by admin
Stefan wrote:$FolderList = folderreport(type="dirs", "r", "C:\Temp", "r")
Type: dirs: recursive list of all subfolders
Good idea, done!
Re: Multi-user Tags and Comments
Posted: 04 Feb 2011 13:16
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)
.
Re: Multi-user Tags and Comments
Posted: 04 Feb 2011 13:54
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.
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 09:09
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;
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 09:20
by admin
What do you want to prove with your test script?
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 09:39
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;
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 09:58
by admin
I don't see why IF (exists() != 2) should not work.
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 10:28
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)
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 13:41
by admin
Is it a junction?
Re: Multi-user Tags and Comments
Posted: 09 Feb 2011 14:25
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.
.