AutoHotkey Homepage AutoHotkey Community
Let's help each other out
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Get filenames from folder

 
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help
View previous topic :: View next topic  
Author Message
0mega



Joined: 17 May 2007
Posts: 38

PostPosted: Sat Feb 16, 2008 2:51 pm    Post subject: Get filenames from folder Reply with quote

How to get all filenames on currently open folder without filetypes and save as ini file or other textfile

Example:

music1.mp3
music2.mp3
music3.mp3
->
Music.ini

music1
music2
music3
Back to top
View user's profile Send private message
Democratus



Joined: 01 Sep 2007
Posts: 120

PostPosted: Sat Feb 16, 2008 3:40 pm    Post subject: Reply with quote

ControlGet,Path,Line,1,Edit1,A

This command receives the path value in Edit1 of the currently-open window. I am not experienced with past operating system (I use Vista), so I'm not sure how backwards-compatible this is, but on Vista it works like a charm. If you want to make sure that it's an explorer window, just add ahk_class CabinetWClass after the "A".

After that point, simply set a loop to the pattern of %Path%\*.* and go from there. I haven't tested this, but I don't see why it wouldn't work.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    AutoHotkey Community Forum Index -> Ask for Help All times are GMT
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum


Powered by phpBB © 2001, 2005 phpBB Group