batch file using FTPS in schedule

diab0lik

Prominent
Jan 15, 2018
2
0
510
0
[Moderator note: moved post from Networking to Applications General Discussion.]


Hello. I bumped into a problem with Windows Task scheduler...
So i made a batch file that is supposed to upload files of certain file type to external ftp and then move the files from the local folder to another folder while creating a log file of the uploads.
When run manually the script runs flawlesly, uploads all files, create the log and move the files.
However when i create a task to run every day it simply does not.
Here is the script:

ftps -s:\\server\MainFolder\Subfolder\Export\Credentials.txt ftp.name.com -a > \\server\MainFolder\Subfolder\Export\FTPLOG.log
move \\server\MainFolder\Subfolder\Export\*.xml \\server\MainFolder\Subfolder\Export\Exported

where Credentials.txt contains ftp logs and commands but i will post only commands:
user
password
prompt
quote pasv
lcd \\server\MainFolder\Subfolder\Export
binary
mput *.xml
bye

I do have ftps.exe in the folder that contains the batch file and on the task i specify "start in" with the same location, however the task does not run at all and gives me error 203
Where do i break things? :(
 

kanewolf

Splendid
Moderator
even though you have ftps.exe in the same folder. Put a full path on the executable.

Also read this page -- https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2008-R2-and-2008/dd363729(v=ws.10) there may be another error code that you need to help identify the problem.

I wonder if "\\server" is not known to the system account. Do you have the task scheduler run it as system or as you? Have you tried the IP address for "server" rather than the name ?
 

diab0lik

Prominent
Jan 15, 2018
2
0
510
0
Hi, i have the task made to run it no matter if im logged or not, high privs and set up with my local account (administrator). I was thinking if i should put full path to ftps.exe and check again. I will do it today and let you know of the result
UPDATE: it didnt work. Now task is running but not uploading files and its only creating empty log (0 bytes)
I dont think the problem is the path name as later on that same batch i use same path to designate where to look for the files it needs to move and it moves them w/o issue.
 
Thread starter Similar threads Forum Replies Date
David___Only Apps General Discussion 0
S Apps General Discussion 4
M Apps General Discussion 3
N Apps General Discussion 1
NoctisLionward Apps General Discussion 2
malavena Apps General Discussion 3
Tom Waller Apps General Discussion 2
P Apps General Discussion 1
S Apps General Discussion 4
A Apps General Discussion 13
Z Apps General Discussion 1
P Apps General Discussion 7
G Apps General Discussion 0
T Apps General Discussion 5
SHADOWSTRIKE1 Apps General Discussion 3
S Apps General Discussion 3
R Apps General Discussion 3
P Apps General Discussion 2
M Apps General Discussion 3
ChaoticWolf Apps General Discussion 30

ASK THE COMMUNITY