Hello,
I have a problem with a PowerShell-Seript which execute a openft command.
#START
$date = get-date -uformat "%Y%m%d%H%M%S"
switch($args[0]){
test{}
test2{}
default{
$source = "test" #localer Pfad der Dateien
$name = "*.txt" #Name der Dateien (* für Widecard)
$server = "hostip" #Serveradresse
$dest = "/tmp" #Pfad auf Server
$event = "" #Ereignis auf Server nach erfolgreicher Übertragung
# Mailit Daten
$from = "blub@bla.de"
$to = "blub@bla.de"
$subject = "Fehler bei der Übertragung bei Datei"
}
}
foreach ($file in get-Childitem $source\$name -name -exclude save){
mv $source\$file $source\$file.$date
C:\Programme\openFT\bin\ft "-m=f "$source"\"$file"."$Date" "$server"!"$dest"/"$file" user,,'password' -lf='mailit smtp "$from" "$to" "$subject"' -ls=' mv "$source"\"$file"."$date" "$source"\save\"$file"' -rs='"$event"'"
}
#END
If I enter the openft command without variables directly in the shell, the command will be execued without any problems. If I start the PowerShell-Script... nothing. I get no error or something else.