Tom,

We have been able to cobble together what you are looking for..

code:
 ;***** Find where the users My Documents folder is and backup if not on server.

; $Location is the location of where My Documents is located in the registry
; @HomeDrive is the drive location that User Manager has the Home drive as
; $Source is the Path that robocopy uses for Source
; $Dest is the Path that robocopy uses for Destination
; $File is the Filename that robocopy uses
; $Opti is the Options that robocopy uses
; $ShellCMD is the command line that is passed out to run

;***** Edit or Create a log of the backup.
; $FileName the path and name location of the log file
; $X line read from UserBackup.CSV
; $Found if the string is found or not found
; $LineToWrite the information of when the user did a backup

;DEBUG "ON"

$location = ReadValue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders", "Personal")
IF @error = 0
IF Left($location, 2) = @homedrive
? "The location of My Documents is on the server already no backup needed."
ELSE
$source = $location
$dest = Chr(34) + "F:\My Documents" + Chr(34)
$opti = "/R:3 /Z /Mir"
$shellcmd = "RoboCopy " + $source + " " + $dest + " " + $opti

SHELL "%comspec% /c $ShellCMD"
ENDIF
ENDIF

; -- to do the replacement, you should refer to the following post (final reply):
; -- http://www.kixtart.org/cgi-bin/ultimatebb.cgi?ubb=get_topic;f=2;t=001951#000001
$filename = "C:\Data\UserBackup.csv" ;eventully yo be placed on server.
$filename1 = "C:\Data\UserBackup.cs1"
IF Open(1,$filename)
ENDIF
DEL $filename1
IF Open(2,$filename1,5)
ENDIF

$line=ReadLine(1)
WHILE (@error = 0)
$found=Instr($line, @userid)
IF ($found = 0)
? $line
$linetowrite = @userid + "," + @date + "," + @time
? $linetowrite
ELSE
$result=$linetowrite
ENDIF
IF (WriteLine(2,$linetowrite+chr(13)+chr(10)) <> 0)
ENDIF
$line=ReadLine(1)
LOOP
? "complete"
$rc = Close(1) ;Close UserBackup.csv file
$rc = Close(2) ;Close UserBackup.cs1 file
COPY $filename1 $filename /h
DEL $filename1

EXIT

HTH,

Kent

[ 10. September 2002, 14:12: Message edited by: kdyer ]
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's