AutoHotkey Community

It is currently May 27th, 2012, 8:50 am

All times are UTC [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: October 28th, 2004, 7:05 am 
Offline

Joined: July 22nd, 2004, 6:33 am
Posts: 193
Location: cedar city UT
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^


Report this post
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: tomoe_uehara, Xx7 and 12 guests


You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Group