billgatetlhai Posted May 19, 2009 Share Posted May 19, 2009 (edited) I want to list all the file on drive C in a text file. Do you mind giving me some code to do it?[/color] Edited May 19, 2009 by billgatetlhai Link to comment Share on other sites More sharing options...
Valuater Posted May 19, 2009 Share Posted May 19, 2009 (edited) We do not accept script/program orders. You can go to Rentacoder.com for that. ... However, if you wish to learn Autoit, we will be glad to help you. 8) BTW ... Welcome to the Autoit Forums Edited May 19, 2009 by Valuater Link to comment Share on other sites More sharing options...
rudi Posted May 19, 2009 Share Posted May 19, 2009 Hi. Welcome to the forum. I want to list all the file on drive C in a text file. Do you mind giving me some code to do it? 1.) please read the FAQ (topmost, sticky postings here), also have a quick read of the very good Autoit documentation. 2.) it is absolutely not necessary to use bold blue font to ask just one line 3.) it IS defenitely a very good idea to choose a topic, that is describing what you want to solve. E.g. "how to list all files in C: to a file" To solve your task, a simple windows command will do: dir c:\*.* /s/b/a-d > AllFilesInC.txt /s= subdirectories /b= output with full path/filename /a-d: attribute NOT equal "D" (directory), that's the files. To do so using autoit, search for the UDF (user defined function) file "FileListToArray3.au3". There you have much better options available than filelisttoarray() is offering, especially recurson and a switch to find files and folders / files only / folders only. By this you have the results already in an array to do further operations, a temporary file is not necessary this way. Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
billgatetlhai Posted May 21, 2009 Author Share Posted May 21, 2009 Thank you very much! Link to comment Share on other sites More sharing options...
rudi Posted May 25, 2009 Share Posted May 25, 2009 Thank you very much!You are welcome! Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now