Sign in to follow this  
Followers 0
Philippe

Write a DIR result in a text file.

2 posts in this topic

Hello !

I want to write a list of directories and files, with size, date, ... in a text file.

... with AutoIt, of course.

This exemple doesn't do it, but write the return code of the DIR :

$message = RunWait(@COMSPEC & " /c Dir C:\assos /O-S")

FileOpen ("file.txt", 1)

FileWriteLine("file.txt", $message)

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

RunWait(@COMSPEC & " /c Dir C:\assos /O-S > c:\file.txt")

Add the text in RED above

The diretcory listing is now in the file c:\File.txt

Edited by sandyd

----[ SandyD ]---

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