My code is :
I changed the user name and password. The error I get is 'The syntax of the command is incorrect.'
For the directory, I have tried "\olc_test_upload_v0j5", "olc_test_upload_v0j5", and "/olc_test_upload_v0j5". None seemed to change anything, same error.
The file (ghxInv.bak) does get deleted.
Does anybody have an idea of what I am doing wrong?
Code:
#!/usr/bin/perl -w
use Net::FTP;
$vPath1 = 'D:\\Appdata\\Invoice';
$vName1 = 'D:\\Inetpub\\ftproot\\Invoice\\ghxInv.bak';
if (-e $vName1)
{
$rc=system("del /Q $file1");
$rc=system("cd $vPath1");
$host="edmapp";
$username="abc";
$password="1234";
$directory="\olc_test_upload_v0j5";
$ftp=Net::FTP->new($host);
$ftp->login($username, $password);
$ftp->cwd($directory);
$ftp->binary();
foreach $file (@files)
{
$ftp->put($file);
}
$ftp->quit();
}
I changed the user name and password. The error I get is 'The syntax of the command is incorrect.'
For the directory, I have tried "\olc_test_upload_v0j5", "olc_test_upload_v0j5", and "/olc_test_upload_v0j5". None seemed to change anything, same error.
The file (ghxInv.bak) does get deleted.
Does anybody have an idea of what I am doing wrong?