On the other hand, I also used it as a way to find a way to bypass an issue with XYplorer not being able to do much else when it's busy processing a script. The problem with finding long path is that if your system has many many files and length you specified is small (generally less than 150), the script pretty much makes XYplorer "freeze" and you can't do anything else to it until XYplorer finishes the script (which during testing with this script and my system, I had to wait for around 10 minutes) due to the amount of files it found that was longer than 150 that I had specified. Anyway, the bypassing method seems to work and the details is here:
http://www.xyplorer.com/xyfc/viewtopic.php?f=7&t=9473
Currently I have the results of the LongPathFinder saved in a text file called LongPath.txt which is automatically opened after the script finish. You can uncomment and comment this part of the code:
Code: Select all
WriteFile("<xyscripts>\LongPath.txt","$LongCat",a,tu);
Open "<xyscripts>\LongPath.txt";
//Text $LongCat;Code
The pre-run code LongPathFinder.xys:
Code: Select all
/*
Long Path Finder 0.1 (March 29, 2013) by Enternal
Files: LongPathFinder.xys, LongPathRun.xys
*/
If Exists("<xyscripts>\LongPathLength.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPathLength.txt"; }
If Exists("<xyscripts>\LongPathItems.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPathItems.txt"; }
If Exists("<xyscripts>\LongPathRaw.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPathRaw.txt"; }
If Exists("<xyscripts>\LongPath.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPath.txt"; }
$Length = Input("Long Path Finder","Files With Path Longer Than The Specified Length Will Be Listed.<crlf>Recommend Above 150. Anything Lower Could Freeze XYplorer<crlf>If There Are Many Files.","256",s,0);
$NTest = RegExMatches("$Length","\D"); // \D Same As [^0-9]. http://gskinner.com/RegExr/
If ($NTest == "") {
Continue; }
Else {
Msg "$Length Is NOT A Valid Numerical Value."; }
End ($Length == 0);
WriteFile("<xyscripts>\LongPathLength.txt","$Length",,t);
$SelectedItems = Get("SelectedItemsPathNames","|");
WriteFile("<xyscripts>\LongPathItems.txt","$SelectedItems",,tu);
Run """<xypath>\<xyexe>"" /ini=""<xyini>"" /win=min /script=""LongPathRun""";Code: Select all
/*
Long Path Finder 0.1 (March 29, 2013) by Enternal
Files: LongPathFinder.xys, LongPathRun.xys
*/
Global $Files;
$Length = ReadFile("<xyscripts>\LongPathLength.txt",t);
$LongCat = "";
$SelectedItems = ReadFile("<xyscripts>\LongPathItems.txt",t);
ForEach($Item,$SelectedItems,"|") {
If Exists($Item) == 1 {
$Files = "$Files"."|"."$Item"; }
ElseIf Exists($Item) == 2 {
$FFiles = FolderReport("files","r",$Item,"r",,"|");
$Files = "$Files"."|"."$FFiles"; } }
$Files = FormatList("$Files","e");
ForEach($Item,$Files,"|") {
If Report("{Len}",$Item) > $Length {
$LongCat = "$Item"."|";
WriteFile("<xyscripts>\LongPathRaw.txt","$LongCat",a,tu);
$LongCat = ""; } }
If Exists("<xyscripts>\LongPathRaw.txt") == 0 {
Msg "No Files With Path Longer Than $Length Found.";
Exit "n"; }
$LongCat = ReadFile("<xyscripts>\LongPathRaw.txt",t);
$LongCat = Replace(FormatList("$LongCat","enq","|"),"|","<crlf>");
WriteFile("<xyscripts>\LongPath.txt","The Following Items Have Path Longer Than $Length:<crlf><crlf>",a,tu);
WriteFile("<xyscripts>\LongPath.txt","$LongCat",a,tu);
Open "<xyscripts>\LongPath.txt";
//Text $LongCat;
If Exists("<xyscripts>\LongPathLength.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPathLength.txt"; }
If Exists("<xyscripts>\LongPathItems.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPathItems.txt"; }
If Exists("<xyscripts>\LongPathRaw.txt") == 1 {
Delete 0,0,"<xyscripts>\LongPathRaw.txt"; }
Exit "n";
XYplorer Beta Club