Jump to content

Who help me!


Recommended Posts

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!

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...