I made a bact file for the ease of using ftp.exe through cmd prompt.
@echo off
echo user username> ftpcmd.dat
echo pasword>> ftpcmd.dat
echo bin>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat server
del ftpcmd.dat
it works on some machines, but on others i get this error.
< was unexpected at this time.
C:\WINDOWS\system32><html><head><meta http-equiv="refresh" content="0;url=http://search.suddenlink.net/index.php?origURL=http://hiddenforprivacyiaddedthis"/></head><body><script>window.location="http://search.suddenlink.net/index.php?origURL="+escape(
i don't understand what is going on. any help wouldbe awesome.
thi s error is coming from a xp sp3 machine.
Trouble with ftp batch file.
Moderator: DosItHelp
Re: Trouble with ftp batch file.
i can't figure out why this error is happening.
-
- Expert
- Posts: 442
- Joined: 01 Aug 2010 17:13
- Location: Canadian Pacific
- Contact:
Re: Trouble with ftp batch file.
Are you trying to copy an HTML file? Try copying in binary mode instead of ASCII. I don't know why a file transfer would be processed through the command interpreter, but it seems you're encountering a < at +escape(< in an HTML file.
Re: Trouble with ftp batch file.
It's a jpg file. Im running it in binary mode i think.. I was hoping this code "echo bin>> ftpcmd.dat" put it in binary mode. thanks.
-
- Expert
- Posts: 442
- Joined: 01 Aug 2010 17:13
- Location: Canadian Pacific
- Contact:
Re: Trouble with ftp batch file.
Is there more to your script? What you've given doesn't have any indication of being problematic.
Re: Trouble with ftp batch file.
naw thre is nothing else.
i runt it b typing
ftile up file name
i runt it b typing
ftile up file name
Re: Trouble with ftp batch file.
Things to check.
1) Verify you do not have an ftp.bat anywhere in your PATH on the machine that is failing.
2) Is the error message you posted related to the contents of the file you are attempting to upload? It looks like you tried to upload an HTML file and somehow Windows is trying to interpret the contents as batch commands. There is nothing in the code (pseudo code?) that you posted that should cause this.
Dave Benham
1) Verify you do not have an ftp.bat anywhere in your PATH on the machine that is failing.
2) Is the error message you posted related to the contents of the file you are attempting to upload? It looks like you tried to upload an HTML file and somehow Windows is trying to interpret the contents as batch commands. There is nothing in the code (pseudo code?) that you posted that should cause this.
Dave Benham