sleepyy35
Joined: 22 Jul 2004 Posts: 193 Location: cedar city UT
|
Posted: Thu Oct 28, 2004 6:05 am Post subject: example: inputbox,loop,FileRecycle, |
|
|
Here is a good example I made using a inputbox, loop,and FileRecycle, command for anybody who might find this useful
first i use the InputBox,
| Code: | InputBox, UserInput1, file find, Please enter a file name., , 200, 100 ;Height & Width
if ErrorLevel <> 0
MsgBox, CANCEL was pressed.
; %c% being the c:\ drive that is being searched UserInput1 is what you type in the inputbox will also be used in the loop search as you can see by the Variable %UserInput1%.
else
Loop,%c%\%UserInput1%, , 1 ; Recurse into subfolders.
{
MsgBox, 4, , Filename = %A_LoopFileFullPath%`n`nContinue?
IfMsgBox, No
break
;useing the %A_LoopFileFullPath% Variable witch gives the The full path and name of the file/folder currently retrieved witch will show the full path and file name of the file being search.
MsgBox, 4, , del this file ? .`n`nContinue?
IfMsgBox, No
Continue
FileRecycle, %A_LoopFileFullPath%
}
; then useing the FileRecycle, command i have the option of sending the file search results to the Recycle bin
---------------------------------------------------------------------------------
I hope I have not confused anyone :roll: but here is the full script I hope this EXAMPLE has help someone :)
InputBox, UserInput1, file find, Please enter a file name., , 200, 100
if ErrorLevel <> 0
MsgBox, CANCEL was pressed.
else
Loop,%c%\%UserInput1%, , 1 ; Recurse into subfolders.
{
MsgBox, 4, , Filename = %A_LoopFileFullPath%`n`nContinue?
IfMsgBox, No
break
MsgBox, 4, , del this file ? .`n`nContinue?
IfMsgBox, No
Continue
FileRecycle, %A_LoopFileFullPath%
} |
_________________ ^sleepy^ |
|