|
|
|
|
#1 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Locate plugin
Features:
1. Search for directories or empty directories and/or files -search with wildcard -search with extensions filter (include/exclude) -search with times filter -search with size filter -search with attributes filter -sort files and/or directories by name, type, size, date (with reverse or not) -output first files or directories -search with subdirectories or not -search with banner support -return path\name -return path -return name -return size of file -return date of file or directory -return attributes of file or directory 2. Find the size of a file, files wildcard or directory (locate::GetSize) 3. Find the sum of the files, directories and subdirectories (locate::GetSize) 4. Remove empty directories and/or subdirectories (locate::RMDirEmpty) This plugin is the replacement for Locate and GetSize functions. "Locate" plugin v1.0 |
|
|
|
|
|
#2 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Changes:
-Option /X and /-X - Separated by "|" instead of "," (locate::Open) -New: option /P - Additional paths to "[Path]" (locate::Open) -New: option /-PF - Don't locate in these paths (locate::Open) -New: option /-PN - Don't locate in these directories (locate::Open) "Locate" plugin v1.1 Last edited by Instructor; 17th September 2005 at 14:09. |
|
|
|
|
|
#3 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Changes:
-New: options /N and /-N - names filter (locate::Open) -Readme improvement "Locate" plugin v1.2 |
|
|
|
|
|
#4 |
|
Member
Join Date: Jul 2003
Posts: 83
|
Does anyone have any example ModernUI code that uses this locate plugin?
I want to locate several files, and present the user with a way of selecing one of them. How would I go about doing this? |
|
|
|
|
|
#5 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Here you go. Script also using Takhir's nxs plugin
|
|
|
|
|
|
#6 |
|
Member
Join Date: Jul 2003
Posts: 83
|
Perfect. Thanks.
|
|
|
|
|
|
#7 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Fixed: Case sensitive sort of files and directories (if used sort by "NAME" or "TYPE"). Now case insensitive.
Fixed: Accepted only uppercased sort type "NAME|TYPE|SIZE|DATE". Now case insensitive. "Locate" plugin v1.3 |
|
|
|
|
|
#8 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Fixed: CRT function "tolower" in StrFunc.h didn't return correct national character. "tolower", ("islower", "setlocale" ...) replaced with "CharLower" (user32.dll).
"Locate" plugin v1.4 Last edited by Instructor; 14th December 2005 at 07:47. |
|
|
|
|
|
#9 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Changed: Now plugin is msvcrt.dll independed -> work on Win95 (thanks kichik)
Updated: "ConvFunc.h" to v1.3 "Locate" plugin v1.5 |
|
|
|
|
|
#10 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Changed: Removed option "/P=", now plugin can accept multi-path in first parameter
Updated: "ConvFunc.h" to v1.5 Updated: "StrFunc.h" to v1.6 Changed: Now plugin used header "Locate.nsh" for custom user variables and better compile errors check. Update from previous versions: - Insert line in script: !include "Locate.nsh" - Replace: locate::Open -> ${locate::Open} ... - Replace: .r0 -> $0, .r1 -> $1 ... .R0 -> $R0, .R1 -> $R1 ... "Locate" plugin v1.6 |
|
|
|
|
|
#11 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Fixed: ignore files/directories names which began with "."
Fixed: error, if file had more then 16 characters extension Fixed: "/SF=DATE" <=> "/-SF=DATE" Updated: "StrFunc.h" to v1.7 Updated: "StackFunc.h" to v1.9 Updated: "ConvFunc.h" to v1.7 Changed: Now if files has same date or size they sorted by name Added: handles for search "Locate" plugin v1.7 |
|
|
|
|
|
#12 |
|
Member
Join Date: Apr 2006
Posts: 66
|
Hi instructor,
How do I use this syntax ${locate::Find} "[handle]" $var1 $var2 $var3 $var4 $var5 $var6 1. I need to find the directory or file exist in C:\Program Files\ 2. I need it to change the InstallDIR or setoutpath to the found dir or file in it. could u create a function for me to perform the task. |
|
|
|
|
|
#13 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
Fixed: locate::Open failed to open paths ended with backslash
Updated: "StrFunc.h" to v1.9 Updated: "StackFunc.h" to v2.0 Updated: "ConvFunc.h" to v2.0 "Locate" plugin v1.8 |
|
|
|
|
|
#14 |
|
Senior Member
Join Date: Aug 2005
Location: Brazil
Posts: 110
|
Hi, many of our users are having problems when NSIS uses locate plugin inside windows 7, mainly because msvcr71.dll is natively missing. Can this be fixed (removing this dependency)? Thanks.
|
|
|
|
|
|
#15 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
zeeh3
You are using self-rebuilded dll? You can check with "Dependency Walker" that plugin linked only to kernel32.dll and user32.dll. |
|
|
|
|
|
#16 |
|
Senior Member
Join Date: Aug 2005
Location: Brazil
Posts: 110
|
Sorry, there was a mistake... my bad
|
|
|
|
|
|
#17 |
|
Junior Member
Join Date: May 2010
Posts: 3
|
Hi dear Instructor.
I have a problem during using 'locate' with Windows7 32bit My code is following: ${locate::Open} "$0" "/F=0 /G=0" $0 StrCmp $0 0 0 loop MessageBox MB_OK "error" IDOK close loop: ${locate::Find} $0 $1 $2 $3 $4 $5 $6 StrCmp $1 "" close 0 IfFileExists "$1\setup.exe" 0 loop IfFileExists "$1\config.ini" 0 loop ; do smth goto loop close: ${locate::Close} $0 ; at this point application going to hang up ${locate::Unload} |
|
|
|
|
|
#18 |
|
Junior Member
Join Date: Jun 2010
Posts: 5
|
endless loop
Hi Instructor,
I am attempting to cycle through all subdirectories in My Documents. I have hidden directories, the first one Locate comes across is "$AVG" (hidden, readonly). This subdirectory has one subdirectory ($AVG/$CHJW) which contains four files (acgch??.dat). Following is my open command: ${locate::Open} "$DOCUMENTS" "/F=1 /D=0 /M=*-temp-*.ppp|*Recovered*.ppp /A=-HIDDEN /B=1" $0 The find command seems to find an "endless" number of empty paths\files in the $AVG/$CHJW directory. Adding /-PN=$$AVG stops this behavour but I need this script to run on anyones computer. Any assistance appreciated! |
|
|
|
|
|
#19 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
ivansobaka
Make sure you don't change $0 variable in "; do smth" dean.g I'm out of the active NSIS developing, but you can pack this folder and send me on email I will try to reproduce the bug. |
|
|
|
|
|
#20 |
|
Junior Member
Join Date: May 2010
Posts: 3
|
I dont use $0 variable in "; do smth"
But I've changed following string ${locate::Close} $0 to ${locate::Close} $R1 Now it works right, thank you very much |
|
|
|
|
|
#21 |
|
Junior Member
Join Date: Jun 2010
Posts: 5
|
loop
Hi Instructor,
If you need more information please let me know. Cheers! Dean |
|
|
|
|
|
#22 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
|
|
|
|
|
|
#23 |
|
Junior Member
Join Date: Oct 2011
Posts: 1
|
Doesn't Locate All Files
For some reason this plugin cannot locate files such as
c:\.Rhistory Is there some work-around? |
|
|
|
|
|
#24 |
|
Major Dude
Join Date: Jul 2004
Posts: 665
|
mlf176f2
Is not reproduced. code: |
|
|
|
|
|
#25 |
|
Junior Member
Join Date: May 2012
Posts: 2
|
My installer crashes when I run locate. It always crashes when it hits a particular folder (c:\Program Files (x86)\Oracle\). Runniny on windows 7.
code: |
|
|
|
|
|
#26 |
|
Moderator
Join Date: Nov 2002
Location: Birmingham, England
Posts: 8,216
|
If it is reproducible how about running it through a debugger. If you are up for installing Visual Studio 2010 Express and the Windows 7 SDK then I will explain how.
Stu Need an installer? http://www.afrowsoft.co.uk |
|
|
|
|
|
#27 |
|
Junior Member
Join Date: May 2012
Posts: 2
|
ok thanks. i'll get back to you if i get that installed.
i'm looking at an another approach looking up exe path through the registry. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|