Our Products:   CompleteFTP  edtFTPnet/Free  edtFTPnet/PRO  edtFTPj/Free  edtFTPj/PRO
0 votes
4.9k views
in CompleteFTP by (120 points)
I've created the following script to trigger on an upload to a specific directory. It does work from command-line with Powershell, but it will not work from the event trigger and returns an error of "Missing expression after unary operator '-'. At line:1 char:2". Any help?

$Source = "\\entsrv37vd\d$\xftp\sftp\EDI\in"
$Destination = "\\entsrv36vd\d$\EDI\inbound"
$ArchiveDir = "\\entsrv37vd\d$\xftp\sftp\EDI\archive"
$List = dir $Source
foreach($file in $list){
copy-item -Path $file.FullName -destination $Destination
move-item -Path $file.FullName -destination $ArchiveDir
}


Thanks in advance!

Bill

1 Answer

0 votes
by (162k points)
For the information of readers we've sent a patch to be tested.

Categories

...