Jump to content
Sign in to follow this  
Smiley357

making dir/file list

Recommended Posts

Smiley357

Is there a function that will read all directorys and files on the a drive and then output them to a txt file? Also, looking for a function that will do the same for the registry. I guess maybe doing a reg backup and renaming the .reg file to .txt. Any helpful hints/ideas would be appreciated.

Share this post


Link to post
Share on other sites
will88

Is there a function that will read all directorys and files on the a drive and then output them to a txt file? Also, looking for a function that will do the same for the registry. I guess maybe doing a reg backup and renaming the .reg file to .txt. Any helpful hints/ideas would be appreciated.

as for reading all the directorys under c: drive

#include <Constants.au3>
$foo = Run(@ComSpec & " /c dir", @HomeDrive, @SW_HIDE, $STDERR_CHILD + $STDOUT_CHILD)
Sleep(1000)
$line = StdoutRead($foo);reading command prompt
FileWrite("C:\test.txt", $line);Output to C:\test.txt

If that don't work then change the " /c dir" to "/c dir C:\"

Share this post


Link to post
Share on other sites
Smiley357

@Will88

Thanks for the code. Its a good starting point for what Im trying to do. I was looking at _FileListToArray when you posted your code.

Basically what Im trying to do is write my own snapshot program. I want to take a snapshot of my hard drive and registry then install some freeware and see what has changed. I dont trust freeware that much but I like to use it. This way I can see if they try to hide things in the install. Im sure someone has done this already. But I figured I would give it a shot.

Share this post


Link to post
Share on other sites
ksmith247

Check this post for the RecursiveFileSearch UDF by weaponx (#1 Array Based). Calling it like this... RecursiveFileSearch("C:\", ".") should do it.

for the registry, try _RegSearch() by PsaltyDS.


Support bacteria; it's the only culture most people have.LxP's Learning to Script with AutoIt 3 - Excellent starting placeVolly's Links Page - Links to cool and useful scriptsAutoIt Wrappers - Valuater's AutoIt Wrappers post. Lots of good stuff.Support AutoIt - Make a donation here; I did.[size="2"]#include <Guinness.pint>[/size]

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  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.