topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Wednesday December 11, 2024, 6:55 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: DONE: Difficult Finder  (Read 13286 times)

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
DONE: Difficult Finder
« on: September 24, 2012, 04:23 PM »
Difficult Finder

Open a folder in a path predefined.
Open a folder inside a folder proposing his name after invoking the script by a definable hotkey.

I would like a snack for :

1. Using a hotkey run a script that open a window to propose the name of a subfolder
2. All the subfolders are from a given path . By example : Y:\GABINETE\PROYECTOS\
3. If the subfolder exists open the folder. If not simply return.

By example

I wish to open the subfolder 206

That is
Y:\GABINETE\PROYECTOS\206

P.D. I have a more difficult situation . I want to open all the subfolders from a list of paths is exists.
By example : I wish to open the subfolder 206 proposing its name in a window invoked by a hotkey.
Then open in these paths if exist :
Y:\Example\Path1\
Y:\engineer\path2\
......
y:\conta\


That is. Open if exist :
Y:\example\path1\206\
Y:\engineer\path2\206
......
y:\conta\206

I would like a fast script.

Thanks

« Last Edit: September 24, 2012, 07:42 PM by Contro »

Ruffnekk

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 332
  • Uhm yeah...
    • View Profile
    • RuffNekk's Crypto Pages
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #1 on: December 03, 2012, 06:05 AM »
Are you still looking for a solution to this problem?
Regards,
RuffNekk

Programming is an art form that fights back.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #2 on: December 03, 2012, 07:41 PM »
 :)
Yes I would like.
I have not solved.
Best Regards

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #3 on: December 03, 2012, 09:10 PM »
MultiOpen.au3 - No error checking, no error messages, absolutely nothing happens if the path doesn't exist, doesn't run in the background, doesn't make coffee.

Code: AutoIt [Select]
  1. #Region ;**** Directives created by AutoIt3Wrapper_GUI ****
  2. #AutoIt3Wrapper_UseUpx=n
  3. #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
  4. #include 'RFLTA.au3'
  5.  
  6. Local $output
  7. Local $inifile = StringLeft(@ScriptName, StringLen(@ScriptName) - 4) & '.ini'
  8.  
  9.  
  10. Local $subdir = InputBox('MultiOpen', 'Sub-directory to open:' & @CRLF & @CRLF & 'Wildcards * and ? can be used.', '*')
  11. If $subdir = '' Then $subdir = '*'
  12.  
  13. Local $paths = IniReadSection($inifile, 'Paths')
  14.  
  15.  
  16. For $i = 1 To $paths[0][0]
  17.         If $subdir <> '*' Then
  18.                 Local $sDirs = _RecFileListToArray($paths[$i][1], $subdir, 2, 0, 0, 1)
  19.                 If IsArray($sDirs) Then
  20.                         For $j = 1 To $sDirs[0]
  21.                                 ShellExecute($paths[$i][1] & '\' & $sDirs[$j])
  22.                         Next
  23.                 EndIf
  24.         Else
  25.                 ShellExecute($paths[$i][1])
  26.         EndIf

MultiOpen.ini example:

Code: Text [Select]
  1. [Paths]
  2. path1=R:\test
  3. path2=c:
  4. path3=r:\test\contro
  5. path4=d:\temp

Run it by double-clicking on the icon or set up a hotkey in your favourite launcher or Windows - there's no need to have it running in the background.

EDIT: Fixed .ini file and now respects Cancel button. :/
EDIT2: Added wildcards.
« Last Edit: December 05, 2012, 11:43 PM by 4wd »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #4 on: December 03, 2012, 09:13 PM »
Running to coffee

Ouwwww. Running to try
 ;D

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #5 on: December 04, 2012, 06:12 PM »
No change to code but I removed the trailing \ on one of the entries in the ini.

ie. No trailing \ on paths.

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #6 on: December 04, 2012, 07:39 PM »
Okis
Running to try

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #7 on: December 04, 2012, 07:41 PM »
What do you mean ?
Until the moment I don't know exactly what to do
Please, can you explain me ?

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #8 on: December 04, 2012, 09:13 PM »
This good:
Code: Text [Select]
  1. path2=c:

This bad:
Code: Text [Select]
  1. path2=c:\

Edit MultiOpen.ini to add in the paths you want the program to look in for sub-directories.

Run the program, enter in the sub-directory you want to open in the paths you have configured - if they exist, they will be opened in Explorer, (I think - worked OK for DOpus).

eg. for your example MultiOpen.ini would look like this:
Code: Text [Select]
  1. [Paths]
  2. path1=Y:\Example\Path1
  3. path2=Y:\engineer\path2
  4. path3=y:\conta

and you would enter 206 when you ran the program.

2012-12-06_16-40-23.png

If you enter nothing and hit OK, all the directories in MultiOpen.ini will be opened.
« Last Edit: December 05, 2012, 11:40 PM by 4wd »

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #9 on: December 05, 2012, 08:07 AM »
Undertood completely now.
I'll try and comment.
Best Regards
 :-* :Thmbsup:

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #10 on: December 05, 2012, 08:15 AM »
Nice indeed.
I need to propose the exact name of the folder.
That's : 206.12 goes well
206 don't open because is not the complete name.

Exist an option to look in subchains of the folders ?

The program goes marvellous and is fast.
 :P

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #11 on: December 05, 2012, 11:44 PM »
Added wildcards.

eg. 206*

Contro

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 3,940
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #12 on: December 06, 2012, 10:27 AM »
thank you !!!!!!!!!!!!!!

http://img186.imageshack.us/img186/3994/aa0qm2.gif
DONE: Difficult Finder

skwire

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 5,287
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #13 on: December 06, 2012, 10:48 AM »
Nice work, all.  Contro, I assume we can call this one done?  If so, I'll move it to the finished section.

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 5,644
    • View Profile
    • Donate to Member
Re: DONE: Difficult Finder
« Reply #14 on: December 06, 2012, 08:06 PM »
Move it!  Quick!!

 :P