Jump to content

Copying Favorites from list of remote computers/dir

Recommended Posts

Hey all, this is my first posting, so please take pity on me....

I have been using autoit for YEARS and am usually able to figure out what I need. This is the first time that I think I have painted myself into a corner.

I am trying to put something together that will copy "favorites" directories from remotes computers and save them for backup purposes in a simple way to view later. I know the computer obviously needs to be on for the copy.


existing file - !complist.txt (simple text file with list of computer names

Batch 1 - Creates individual files with list of user directories within the D & S directory


for /f "eol=#" %%i in (!complist.txt) do call :sub %%i


dir "\\%1\c$\documents and settings\" /b > %1


Once the files/lists are generated (list of individual files saved to !computerdirs.txt), I tried to write and autoit script that will look to a list of the files it created and then robocopy the files to the backup directory on a separate computer.

Script - I have created so many variations now, that this is what I believe to be the closest to what I am trying to do.


$file = FileOpen("!computerdirs.txt" , 0)

$computername = filereadline ($file)

$dirlist = fileopen ($computername, 0)

While 1

$dirname = FileReadLine($dirlist)

If @error Then Exitloop

Runwait(@ComSpec & " /c " & '!robocopy "\\'& $computername &'\c$\documents and settings\'& $dirname &'\favorites" ".\favbkup\'& $computername &'\'& $dirname &'\favs" /MIR /ETA /R:0', "", @SW_SHOW)





What happens on the above is either, it gets caught in a loop, or just stops after it reads the first file with the list of computer names on it.

I am very sure that someone reading this is saying.... there is such an easier way to do this....

PLEASE TELL ME HOW.....!!!! : )

Thank you for your time and for reading this. I look forward to someone tearing me apart.



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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...