#!/usr/bin/perl -w use strict; use Win32; my $username = Win32::LoginName(); my $path = "u:\\profiler\\$username"; my $profile = "C:\\Documents and Settings\\$username" stat($path); exit if !-e _; # exit if the profile is not found system ("xcopy /i $path $profile");