Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


hzkthf
2010-01-29T17:40:22Z
Are there known problems or limitation to running .cmd files that contain command line FTP commands? All of my jobs fail to successfully run the FTP commands. (Although no failure messages are shown by VisualCron)

running:
"FTP -i -s:C:\transfers\EEP\fromtext.txt" where fromtext.txt contains:

open 999.99.9.99 (valid ftp address)
xxxftp
eddata
cd xxx_adt
mget *.dat
mdel *.dat
cd archive
mput *.dat
quit

run from windows scheduler get:
230 User xxxftp logged in.
ftp> cd xxx_adt
250 CWD command successful.
ftp> mget *.dat
200 Type set to A; form set to N.
200 PORT command successful.
150 Opening data connection for xxx027.dat (1656324 bytes).
226 Transfer complete.
ftp: 1657648 bytes received in 1.73Seconds 955.97Kbytes/sec.

ftp> mdel *.dat
200 Type set to A; form set to N.
250 DELE command successful.
ftp> cd archive
250 CWD command successful.
ftp> mput *.dat
200 PORT command successful.
150 Opening data connection for xxx027.dat.
226 Transfer complete.
ftp: 1657648 bytes sent in 1.72Seconds 964.87Kbytes/sec.

ftp> quit
221 Goodbye.

same command file run from VisualCron
230 User xxxftp logged in.
ftp> cd xxx_adt
250 CWD command successful.
ftp> mget *.dat
Bad directory components

200 Type set to A; form set to N.
Cannot find list of remote files.

ftp> mdel *.dat
Bad directory components

200 Type set to A; form set to N.
Cannot find list of remote files.

ftp> cd archive
250 CWD command successful.
ftp> ftp> mput *.dat
*.dat:File not found
quit
221 Goodbye.
Sponsor
Forum information
Support
2010-01-29T18:09:21Z
It seems that you are working the wrong folder because the response is that it cannot find any files with that wild card.

Try throwing in a PWD so you really now what folder you are in.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2010-01-29T18:54:34Z
Ok, did what you asked and here are the results. This is the most common result I've seen in the jobs.



FTP -i -s:C:\transfers\testfrom.txt

testfrom.txt is as follows:
open 999.99.9.99
xxxxxxx
xxxxxxx
cd mdt_adt
pwd
dir
quit

Windows Scheduled task results:

Fri 01/29/2010
09:35 AM

c:\Transfers>FTP -i -s:C:\transfers\testfrom.txt
ftp> Connected to 999.99.9.99.

open 999.99.9.99
220 phi FTP server (Version 4.1 Fri Aug 8 15:14:19 CDT 2008) ready.
User (999.99.9.99:(none)):
331 Password required for xxxxxxx.

230 User xxxxxxx logged in.
ftp> cd mdt_adt
250 CWD command successful.
ftp> pwd
257 "/xxxxxxx/qdx5.3/integrator/phprgen/ftpdata/mdt_adt" is current directory.
ftp> dir
200 PORT command successful.
150 Opening data connection for /bin/ls.
total 8

drwxrwsrwx 2 hci staff 4096 Jan 29 06:40 archive

226 Transfer complete.
ftp: 75 bytes received in 0.00Seconds 75000.00Kbytes/sec.

ftp> quit
221 Goodbye.
Fri 01/29/2010
09:35 AM

VisualCron job results running same command file:

Fri 01/29/2010
09:39 AM

C:\Transfers>FTP -i -s:C:\transfers\testfrom.txt
User (999.99.9.99:(none)): open 999.99.9.99


cd mdt_adt
pwd
257 "/xxxxxxx/qdx5.3/integrator/phprgen/ftpdata/mdt_adt" is current directory.
total 8

drwxrwsrwx 2 hci staff 4096 Jan 29 06:40 archive

dir
quit
Fri 01/29/2010
09:39 AM
Support
2010-01-29T19:19:56Z
I think the problem is, that in VisualCron, you need to add a switch to this folder:

/xxxxxxx/qdx5.3/integrator/phprgen/ftpdata/mdt_adt

..before downloading. So, separate those commands by two rows. And if that should not work then please add the output here.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-01-29T19:23:33Z
By the way, why do you not use the built in commands in VisualCron?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2010-01-29T19:35:07Z
Henrik, thanks for the suggestion but I'm not sure what you mean. I'm not too familiar with command level FTP commands. Can you give me an example of what you mean?
Support
2010-01-29T19:37:05Z
I mean that we have some prebuilt FTP Command types like; download, upload - instead of running custom command. Is there any reason why you can't use those? Is there any function you are missing there?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2010-01-29T19:40:44Z
As far as the built in VisualCron commands, we may end up going that way in the future. Right now we are trying to convert hundreds of jobs from task scheduler to VisualCron so we were trying to just get everything up and running before we started breaking jobs apart and redesigning them. The FTP portion is imbedding in large command files so it will take some research as to how to redesign them. Thanks.
hzkthf
2010-01-29T19:42:24Z
what did you mean by "I think the problem is, that in VisualCron, you need to add a switch to this folder:" thanks
Support
2010-01-29T19:45:10Z
I see.

About your first problem. The main difference with VisualCron is that your initial folder may be different in VisualCron. That is why you probably need to set your working folder first - as an additional command.

The first error you experienced because it did not find any files. I think it would be clear if you used the pwd command in your first example - that you are working in the wrong folder. That is why I recommended to "cd" to the working directory before starting to download or delete files.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2010-01-29T20:08:37Z
I understand what you are saying, the problem is the first error I listed was caused by essentially the same task as the second (I know it is a different error, but the second error is all I can get now). For the most part, what you see in the second error is what I'm getting for all of my jobs. As you can see, I'm not even getting an ftp>connected response. What I'm trying to figure out is why running the same command in VisualCron would not connect while it does in Windows task scheduler.

running from VisualCron

C:\Transfers>FTP -i -s:C:\transfers\tjwfrom.txt
User (999.99.9.99:(none)): open 999.99.9.99
cd /mdt_adt

versus (running from windows)

c:\Transfers>FTP -i -s:C:\transfers\tjwfrom.txt
ftp> Connected to 999.99.9.99.

open 999.99.9.99
220 phi FTP server (Version 4.1 Fri Aug 8 15:14:19 CDT 2008) ready.
User (999.99.9.99:(none)):
331 Password required for xxxftp.

230-Last unsuccessful login: Thu Feb 9 11:44:30 PST 2006 on ftp from ::ffff:999.999.999.99
230-Last login: Fri Jan 29 06:40:00 PST 2010 on ftp from xxxxxxxftp_remote
230 User xxxftp logged in.
ftp> cd mdt_adt
Support
2010-01-29T20:29:04Z
I see. I thought you wanted to send commands only - not connect. We handle connection centrally so it is expected that you already are connected. You cannot connect within a Connection so to speak.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Support
2010-01-29T20:34:49Z
Maybe I have misunderstood you all the way. Are you running Execute Task or FTP Task?
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2010-01-29T20:46:19Z
Obviously we are not communicating very well. I'm simple trying to run FTP passing the following parameters and not succeeding. You can see the results from my log files already posted.

from windows, right after I run the following
FTP -i -s:C:\transfers\tjwfrom.txt
tjwfrom.txt contains:
open 999.99.9.99
xxxftp
eddata
cd mdt_adt
pwd
dir
quit


I get the following
ftp> Connected to 999.99.9.99.
and all subsequent FTP commands are shown as ftp>command-string

From VisualCron right after the
FTP -i -s:C:\transfers\tjwfrom.txt
I get
User (999.99.9.99:(none)): open 999.99.9.99

and all subsequent FTP commands are not show as ftp> but only the command string is shown. Obviously, I'm not connecting to the ftp server successfully but don't know why VisualCron is different. There are no errors shown, could it be a firewall thing or some other kind of security that isn't set up in VisualCron.

I guess I might have to start looking for a different solution to this problem when it seems like it should be so simple...one task scheduler should be able to run the same exact task as another with the same results???
Support
2010-01-29T20:58:50Z
I thought you were trying to execute custom commands on the FTP Task. Obviously you are using the Execute Task. Sorry for that misunderstanding.

I think one problem might be that it runs in another context than usual. Please try to set a Credential, then one you are normally logged in as, in the Execute Task. Because, if you don't specify anything your command will run as SYSTEM which may affect environmental settings, security and things like that.

Also, think about which working folder you want to use. If you execute a command the working folder will be the same folder as your command - but perhaps you want the working folder to be: C:\transfers\EEP\?

I don't know, but this might be differences that cause this to fail.

If you tried the above - and it still fails we would like to know all details about your Execute settings. Best way would be if you exported your settings in VisualCron and sent to support@visualcron.com
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
hzkthf
2010-01-29T22:30:48Z
hzkthf
2010-01-30T00:52:07Z
One more piece of information. I changed my "Execute" task in VisualCron to Use shell execute/No creditial and it seems to connect with FTP. This doesn't seem like a good solution in that I believe this causes me to lose out on capturing other errors within the command file? Any suggestions on why this might work and what other options I can try. Maybe a credentials error although I can't see how in that my original creditial is the same one we use for ftp tasks in windows.
Scroll to Top