Main Area and Open Discussion > General Software Discussion
Open the corresponding folder of the found files
Contro:
Open the corresponding folder of the found files
I would like a soft for :
Open the corresponding folder of the found files.
suppose I would like to find the file "abc.txt" in one of my hard disks.
When the file is found the corresponding folder is opened. That's the idea.
I suppose if many files are encountered may be problem with the memory or the operative system. So better is possible open in series.
Best Regards
:-*
AbteriX:
"found files" ? Where? In WinExplorer?
In WinExplorer there is an option to open the parent folder (try context menu) already.
Contro:
Open folder automatically when the file is found
I have to do nothing
:P
AndyM:
How are you finding the file?
MilesAhead:
OpenFolderThatHas filename
Opens every folder on the drive the script is run from, that contains a file filename. May use wildcards like *.cmd or *.txt. It only accepts one argument. filename
It opens the folder and waits until the window is closed to do the next Loop.
Edit: prompts for filename if none on command line. Enter just a filename, no drive or path (e.g. readme.txt)
--- ---if 0 < 1
{
InputBox,filename,,Enter File Name with no path
if (ErrorLevel)
ExitApp
}
else
filename = %1%
tmp := A_ScriptDir
StringLeft,drive,tmp,3
FilePat := drive filename
Loop, %FilePat%,,1
{
tmp := _FileDir(A_LoopFileLongPath)
;MsgBox, 8256, Test, %A_LoopFileLongPath%`n%tmp%
Run,%tmp%
WinWaitActive,%tmp%,,5
if (ErrorLevel)
continue
while WinExist(tmp)
{
Sleep,250
}
}
_FileDir(path)
{
SplitPath,path,,fdir
return fdir
}
edit: I removed the "#notrayicon" so it can be killed via tray icon to break the loop. Also note that it waits until a window with the title that matches the folder name no longer exists. If you happen to have the same folder already open, it will hang. So close all explorer windows before running, or fix the script. :)
Navigation
[0] Message Index
[#] Next page
Go to full version