Welcome to WebmasterWorld Guest from 23.23.46.20

Forum Moderators: phranque

windows batch ftp script

   
8:22 pm on Nov 20, 2012 (gmt 0)

5+ Year Member



Ok I am going bonkers trying to figure out why this is not working.

Basically my batch script will upload 1 file and a 2nd with 0kb. I've tried uploading to differnt servers but still the same thing. Here is my script

f.bat
cd C:\
FTP -i -s:C:\test\f.txt

f.txt
open 50.XX.XXX.XX
username
password
lcd C:\test\z
cd /entries
binary
mput *.jpg
disconnect
bye

I'd like this to keep uploading all the jpg files in the z folder
2:26 am on Nov 21, 2012 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



Ftp: prompt:
http://technet.microsoft.com/en-us/library/bb490670.aspx [technet.microsoft.com]
3:36 pm on Nov 23, 2012 (gmt 0)

5+ Year Member



Ok, this is really strange because my same exact script works fine on two other computers (both at different locations outside this network).

It's as if my network is being limited. I even tried a differnt pc within this same network and got the same results. It will upload the first file and then the second file but with 0kb to that file.

I've tried disabling my firewall and still the same. Also, looked at my router and can't see anything there.

Any ideas?
4:33 pm on Nov 23, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Does it work in command line mode? Start ftp on the command line and try each command one by one. Whichever line fails is your problem.

---

I would suggest you consider psftp rather than insecure ftp. Download it from the PuTTY download page and try that instead.
5:27 pm on Nov 23, 2012 (gmt 0)

5+ Year Member



But why would the exact same script work on 2 other windows7 pc's but then not any of the windows 7 pc in that particular network?
11:58 am on Nov 24, 2012 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Find out which bit fails and then you will have the answer.

Clearly something is different on the different PCs. You say you have disabled the firewall but what if there is something else there such as different A/V, sandboxing, Windows firewall, different setting on the NIC, Defender, file / folder permissions, user account settings,
12:31 pm on Nov 24, 2012 (gmt 0)

WebmasterWorld Administrator phranque is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month



drooh, have you tried the "prompt" command?
5:25 pm on Nov 29, 2012 (gmt 0)

5+ Year Member



I am just completely stumped on this. From my home PC it works fine as expected with no issues. Here on this PC it keeps doing the same thing. It uploads the first file fine and then the 2nd one with 0kb.

I tried using the "prompt" directive and I can see in my script where it says mput *.jpg then it says imagename.jpg? disconnect

So it appears as if the terminal is asking me to Ok the 2nd upload?

still really puzzled why this would be different between systems
 

Featured Threads

Hot Threads This Week

Hot Threads This Month