###############################################################################
# Pääohjelma
###############################################################################
my $command  = $ARGV[0];
my $filename = $ARGV[1];
my $www      = $ARGV[2];
my $user     = $ARGV[3];
#my $kurssi   = $ARGV[4];
my ($kurssi,$foo) = split("[/\\x5c]",$ARGV[4],2);
my $comps    = $ARGV[5];
my $passwd   = $ARGV[6];
my $mainpath = $ARGV[2];
my $subpath  = $ARGV[4]; 
my $defwww   = "$www/~$user/$subpath";

if ( $www =~ /\// ) { $defwww = $www; }  # if / in www then this is the
                                         # total path  

if ( $comps lt "           " ) {  $comps = '../comps/'; }  # as default

my $sourcepath  = "";
my $destination = "";

print "Args: 0:$command 1:$filename 2:$www 3:$user 4:$kurssi 5:$comps 6:$passwd 7:$mainpath $subpath 8:$defwww\n";

