Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9302331
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T23:13:51+00:00 2026-06-18T23:13:51+00:00

I have a batch file (ftp.bat) that looks like: @echo off echo user etm124>

  • 0

I have a batch file (ftp.bat) that looks like:

@echo off
echo user etm124> ftpcmd.dat
echo testing123>> ftpcmd.dat
echo put %1>> ftpcmd.dat
echo quit>> ftpcmd.dat
ftp -n -s:ftpcmd.dat ftp.DriveHQ.com
del ftpcmd.dat

This file is located in C:\. Also located in that directory is a file called remote.txt. When running this in the C:\ directory, it just hangs:

C:\>ftp.bat c:\remote.txt

If I look in the C:\, I can see that the ftpcmd.dat file has been created, but my script just hangs.

When I run this locally on my machine, I can send files just fine. But if I try to run this on one of my Windows Server 2003 machines, it hangs.

Anything I’m missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T23:13:52+00:00Added an answer on June 18, 2026 at 11:13 pm

    It seems that the script will trigger an infinite loop, which causes the script to never stop. Try omitting the @echo off from your script to see this happening. Either try renaming your batch file, add an extension to the ftp command (ftp.exe) or even provide a full path to the executable to make it work.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a batch file that requires the user to enter a file path.
I have a batch file to shutdown the PC @echo off Shutdown /s /f
I have a batch file that will detect if the user has the .Net
I have following batch file code: @echo off SET INSTALL_PATH=c:\program files\ :ask_again if exist
I have a batch file that creates a scheduled task using schtasks like this:
I have an FTP batch file that uses DOS commands to pull down some
I have a batch file run.bat that requires many arguments for it to run.
I have a batch file: @echo off cd %AppData%\.minecraft start javaw -Xms1024m -Xmx1024m -Djava.library.path=\bin\natives
I have a batch file that I usually invoke like this: longjob.cmd >result.txt 2>&1
i have a batch(backup.bat)file.in that i have written a command to create a backup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.