3051
General Software Discussion / Re: A software for compress file and able to find them first
« Last post by Contro on August 01, 2012, 07:59 PM »
I'll try. It seems very similar to the other one give me the error windows.
Going to study




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.if 0 < 1
{
MsgBox, 8256, Open Folder That Has, Usage: ofth filename
ExitApp
}
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.-MilesAhead (July 31, 2012, 08:23 PM)

How are you finding the file?-AndyM (July 31, 2012, 07:10 PM)
I suppose with the same program used to open the folder.-Contro (August 01, 2012, 07:45 PM)

How are you finding the file?-AndyM (July 31, 2012, 07:10 PM)
Do you already have a text listing of the files you want compressed? As in, something like this:
c:\path\abc.txt
c:\another\path\def.txt
c:\more\stuff\ghi.txt-skwire (August 01, 2012, 10:07 AM)

ull search power of your chosen tool-daddydave (August 01, 2012, 06:54 AM)

Just now I did this (I have Locate32 and HAOzip installed, I think any archiver would probably do)
- Brought up Locate32 (I can bring it up using Win-F on my system)
- Did a search for .py (Python) files
- Selected a dozen files from the search results.
- Right clicked on the selected results
- Clicked HaoZip > Add to archive (Note: the Windows Explorer right click menu is replicated in Locate32)
- Clicked Browse and browsed to the Desktop
- Gave the filename Test.zip and hit OK.
- Opened the file Test.zip from the desktop and there were all the files I selected.
Is that something like what you need? (Re-reading the original post, I guess you are needing something more automated. It is a little more GUI, though.)
-daddydave (August 01, 2012, 06:27 AM)

So, combining the line I provided with the work by daddydave:
Put rar.exe into somewhere accessible such as the windows folder, and then use this as a batch file:setlocal
set oldcd=%cd%
for /R %%D in (.) do (
cd "%%D"
for %%1 in (*.txt) do rar m -x*.rar -m5 "%%1.rar" "%%1"
)
cd /d %oldcd%
endlocal
Run it in the top folder where you want the compression to happen. Don't run it at your root folder or some system files which should remain txt will be compressed as well. That would be asking for trouble.-eleman (August 01, 2012, 07:07 AM)
I would to scan my hard disk (or disks) for a file with certain conditions-Contro (July 31, 2012, 02:17 PM)
What tool do you currently use to search for files on your system, are you using the Windows default or a third party tool such as Locate32 or Everything. If Windows, what version of Windows?
Are the "certain conditions" fairly constant or do you want to full search power of your chosen tool?-daddydave (August 01, 2012, 06:54 AM)








Far less sophisticated, but a quick and easy hack for a recursive text dump of a directory and files:
http://renegademinds...abid/56/Default.aspxDump file and directory lists to text files
Need a complete list of files and directories from Windows? Don't feel like typing them manually? Here's the answer...
The following is a batch file that runs under command.exe or cmd.exe, depending upon whether you are using Windows 9x/Me or Windows NT/2000/XP/2003. Copy the file contents then save it in your SendTo directory as getDirListing.bat. In Windows NT/2000/XP/2003 the SendTo directory is in <DRIVE>:\Documents and Settings\<YOUR WINDOWS LOGIN>\SendTo.Code: Text [Select]
@echo Directory and sub-directory file listing dump by RenegadeMinds.com. @echo Visit http://Renegademinds.com for more Windows tips and tricks @echo and free software applications. @echo ================================================================== @echo ================================================================== @echo Save this file as getDirList.bat in your SendTo directory. @echo SendTo is under Documents and Settings in each user's directory. @echo Right-click on any directory in Windows Explorer and choose @echo Send To - getDirList.bat @echo ================================================================== @echo ================================================================== @echo Dumping directory listing to c:\dirListing.txt @echo (This may take some time for large directory trees.) @REM the /A switch lists all hidden and system files as well. @REM the /S switch lists all subdirectories and their contents. @dir %1 /A /S > c:\dirListing.txt @echo Opening c:\dirListing.txt in Notepad (Close notepad to delete file) @notepad c:\dirListing.txt @echo Deleting c:\dirListing.txt @del c:\dirListing.txt @pause
Right-click on any directory and choose SendTo > getDirListing.bat.
Cheers,
Renegade
It goes in the "Send to" menu in your context menu.
But like I said, far less sophisticated. The only real benefit is that it is fast, easy, and you don't need to bother opening any software for it.-Renegade (July 07, 2012, 02:31 AM)

Far less sophisticated, but a quick and easy hack for a recursive text dump of a directory and files:
http://renegademinds...abid/56/Default.aspxDump file and directory lists to text files
Need a complete list of files and directories from Windows? Don't feel like typing them manually? Here's the answer...
The following is a batch file that runs under command.exe or cmd.exe, depending upon whether you are using Windows 9x/Me or Windows NT/2000/XP/2003. Copy the file contents then save it in your SendTo directory as getDirListing.bat. In Windows NT/2000/XP/2003 the SendTo directory is in <DRIVE>:\Documents and Settings\<YOUR WINDOWS LOGIN>\SendTo.Code: Text [Select]
@echo Directory and sub-directory file listing dump by RenegadeMinds.com. @echo Visit http://Renegademinds.com for more Windows tips and tricks @echo and free software applications. @echo ================================================================== @echo ================================================================== @echo Save this file as getDirList.bat in your SendTo directory. @echo SendTo is under Documents and Settings in each user's directory. @echo Right-click on any directory in Windows Explorer and choose @echo Send To - getDirList.bat @echo ================================================================== @echo ================================================================== @echo Dumping directory listing to c:\dirListing.txt @echo (This may take some time for large directory trees.) @REM the /A switch lists all hidden and system files as well. @REM the /S switch lists all subdirectories and their contents. @dir %1 /A /S > c:\dirListing.txt @echo Opening c:\dirListing.txt in Notepad (Close notepad to delete file) @notepad c:\dirListing.txt @echo Deleting c:\dirListing.txt @del c:\dirListing.txt @pause
Right-click on any directory and choose SendTo > getDirListing.bat.
Cheers,
Renegade
It goes in the "Send to" menu in your context menu.
But like I said, far less sophisticated. The only real benefit is that it is fast, easy, and you don't need to bother opening any software for it.-Renegade (July 07, 2012, 02:31 AM)
I'm not certain I understand all your requirements, but you might take a look at the late Karen Kenworthy's Directory Printer. It's extremely flexible. I use it frequently to create CSV files for folders/subfolders content. It's a VB6 program, so if you're using windows, you prolly have all the necessaries already installed.-barney (July 07, 2012, 12:57 AM)
This?
http://dirhtml.home....omcast.net/~dirhtml/-rgdot (July 06, 2012, 10:56 PM)