Page 1 of 1
pass the folder path to HCCPro to search for duplicate files
Posted: 09 Nov 2012 21:51
by sfordham
Hi, I have set up a POM to open HCCPro with the intention of searching the folder and subfolders, I am pointing at. HCCPro opens but needs the path the "search path" Can anyone assist please

Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 05:15
by RalphM
Usually things like this need one of XY's built-in variables like <curpath> and most important the right quoting to pass it along to an external program.
If you post your POM's definition and a short procedure how you intend to use it (i.e. from list, tree or whatever) we might be able to help you further.
I assume you have consulted the examples in help re POM already.
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 06:13
by highend
Afaik it doesn't support command line parameters. So you're out of luck.
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 13:36
by PeterH
Maybe, at least, a script that builds a small .bat file?
In that .bat:
- set the current path
- maybe select current drive
- call the wanted program
Then execute this .bat file.
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 14:14
by admin
sfordham wrote:Hi, I have set up a POM to open HCCPro with the intention of searching the folder and subfolders, I am pointing at. HCCPro opens but needs the path the "search path" Can anyone assist please

Hi,
you know that XY has its own dupe finder built in?
Don
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 15:56
by sfordham
Thank you all for posting replies so quickly - very kind.
All I have now is PFA "check folder with HCCPro" \>C:\Program Files (x86)\HCC Pro\HCCPro.exe
Tried open """C:\Program Files (x86)\HCC Pro\HCCPro.exe"" ""<curpath>"" /compact";
Would like help on the bat file and how to incorporate into a PFA/POM
XY is probably the best piece of software I have seen - extraordinary
Thank You all again

Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 16:58
by highend
Their forum is down, the helpfile doesn't mention any cli parameters.
So there is only one option:
A simple XYplorer + Autohotkey script:
Code: Select all
$ahkHelper = "D:\Tools\.Scripts\.AutoHotKey\HccPro_CopyText\HccPro_CopyText.exe";
copytext("<curpath>");
run "$ahkHelper";
Code: Select all
#NoEnv
#NoTrayIcon
#SingleInstance force
appName := "C:\Program Files (x86)\HCC Pro\HCCPro.exe"
Run, %appName%, , , appID
WinWaitActive, Clone Cleaner ahk_class Tform_Main, , 2
if ErrorLevel
{
MsgBox, HccPro window not found...
return
}
else
SendInput {Insert}
WinWaitActive, ahk_class Tform_AddPath, , 2
SendInput %clipboard%
SendInput !a
ExitApp
The compiled .ahk script is attached
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 10 Nov 2012 23:55
by sfordham
$ahkHelper = "D:\Tools\.Scripts\.AutoHotKey\HccPro_CopyText\HccPro_CopyText.exe";
copytext("<curpath>");
run "$ahkHelper";
CHANGED ABOVE TO THIS BELOW TO REFLECT WHERE I PLACED THE "HcPro_CopyText.exe" file
renamed (unchanged see *)
$ahkHelper = "C:\Users\Samsung-RF511\Documents\hccpro.exe";
copytext("<curpath>");
run "$ahkHelper";
* THIS IS THE FILE YOU GAVE ME AND WHICH I USE
#NoEnv
#NoTrayIcon
#SingleInstance force
appName := "C:\Program Files (x86)\HCC Pro\HCCPro.exe"
Run, %appName%, , , appID
WinWaitActive, Clone Cleaner ahk_class Tform_Main, , 2
if ErrorLevel
{
MsgBox, HccPro window not found...
return
}
else
SendInput {Insert}
WinWaitActive, ahk_class Tform_AddPath, , 2
SendInput %clipboard%
SendInput !a
ExitApp
I RUN THE XY SCRIPT AND IT DOES WHAT IT SHOULD EXCEPT THAT IT OPENS HccPro WITH THE FOLLOWING SEARCH PATH, EVEN WHEN I CLEAR ALL SAVED SEARCHES (SEE ATTACHED IMAGE)
C:\Users\Samsung-RF511\Documents\Priobadeach\EXE's&Zips
WHAT YOU GAVE ME IS 99% THERE AND I AM THANKFUL. ANY MORE IDEAS

Re: pass the folder path to HCCPro to search for duplicate f
Posted: 11 Nov 2012 00:05
by highend
I RUN THE XY SCRIPT AND IT DOES WHAT IT SHOULD EXCEPT THAT IT OPENS HccPro WITH THE FOLLOWING SEARCH PATH, EVEN WHEN I CLEAR ALL SAVED SEARCHES (SEE ATTACHED IMAGE)
C:\Users\Samsung-RF511\Documents\Priobadeach\EXE's&Zips
Probably because your current active tab shows that folder?
To prove it, run the script, open a text editor, ctrl + v, copy everything that was pasted into your editor and show it in this thread.
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 11 Nov 2012 19:27
by sfordham
Having cleared previous path in HCCPro.
I run the script and I find that it will point to the required path, which is what I want but will also include the last path unless I clear the search cache in the program prior to running the scripts.
This is a workable solution and I am very appreciative to "highend" for his excellent help.
Re: pass the folder path to HCCPro to search for duplicate f
Posted: 12 Nov 2012 01:45
by highend
Clear the stored paths...
E.g.:
Code: Select all
$ahkHelper = "C:\Users\Samsung-RF511\Documents\hccpro.exe";
$iniFile = "C:\Users\%USERNAME%\AppData\Local\Heatsoft\HCCPro\HCC.ini";
$iniContent = regexreplace(readfile($iniFile), "\[CurrentSearchData_\d+[\s\S]*?<crlf>[\s\S]+(?=\[)", "");
writefile($iniFile, $iniContent);
copytext("<curpath>");
run "$ahkHelper";
Look where your hcc.ini file is stored and adapt the $iniFile variable if necessary...