Sign in to follow this  
Followers 0
billgatetlhai

Who help me!

5 posts in this topic

#1 ·  Posted (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 by billgatetlhai

Share this post


Link to post
Share on other sites



#2 ·  Posted (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 by Valuater

NEWHeader1.png

Share this post


Link to post
Share on other sites

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 :party:

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!

Share this post


Link to post
Share on other sites

Thank you very much!

Share this post


Link to post
Share on other sites

Thank you very much!

You are welcome! Rudi.


Earth is flat, pigs can fly, and Nuclear Power is SAFE!

Share this post


Link to post
Share on other sites

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 account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0