homepage Welcome to WebmasterWorld Guest from 54.166.159.110
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / Webmaster General
Forum Library, Charter, Moderators: phranque

Webmaster General Forum

    
windows batch ftp script
drooh

5+ Year Member



 
Msg#: 4520867 posted 8:22 pm on Nov 20, 2012 (gmt 0)

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

 

phranque

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



 
Msg#: 4520867 posted 2:26 am on Nov 21, 2012 (gmt 0)

Ftp: prompt:
http://technet.microsoft.com/en-us/library/bb490670.aspx [technet.microsoft.com]

drooh

5+ Year Member



 
Msg#: 4520867 posted 3:36 pm on Nov 23, 2012 (gmt 0)

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?

Frank_Rizzo

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4520867 posted 4:33 pm on Nov 23, 2012 (gmt 0)

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.

drooh

5+ Year Member



 
Msg#: 4520867 posted 5:27 pm on Nov 23, 2012 (gmt 0)

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?

Frank_Rizzo

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 4520867 posted 11:58 am on Nov 24, 2012 (gmt 0)

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,

phranque

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



 
Msg#: 4520867 posted 12:31 pm on Nov 24, 2012 (gmt 0)

drooh, have you tried the "prompt" command?

drooh

5+ Year Member



 
Msg#: 4520867 posted 5:25 pm on Nov 29, 2012 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / Webmaster General
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved