How do I pass a username to an FTP command from the command line?

drewwyatt

I am attempting to script a file upload using WinSCP using a batch script. The problem is, I cannot figure out how to pass the FTP username/password to the prompt. Here is my script:

@echo off
"..\..\..\Program Files (x86)\WinSCP\WinSCP.com" /command "option batch abort" "option confirm off" "open ftp://**.***.***.*" "put boom.txt /test/" "exit"
echo Domain\ftp_user
set /p dummy=press enter to close

Currently my echo command isn't working, and the command prompt still shows:

Prompting for credentials....
Username: 

How do I pass a username/password to this thing?

Dimitris Kalaitzis

The syntax for specifying credential in an FTP URL is:

ftp://username:password@hostname/

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I FTP multiple files from the command line?

From Dev

How do I delete everything in /var/mail/username from the command line?

From Dev

How do I execute a command in an iTerm window from the command line?

From Dev

How do I pass command line arguments to stack exec

From Dev

How do I pass a complex number from the command-line to sub MAIN?

From Dev

How do I pass a command-line program a list of files from a directory?

From Dev

How do I open a new command line window from an sh script and then pass in multiple commands

From Dev

How do I send raw ftp command?

From Dev

How do I detach from a controlling terminal from the command line?

From Dev

How do I pass commands to an external command, from bash?

From Dev

How do I show processes for a specific uid or username using command line in python?

From Java

How do I drop a MongoDB database from the command line?

From Java

How do I launch the Android emulator from the command line?

From Dev

How do I run a gui app from the command line?

From Dev

How do I read arguments from the command line with an MPI program?

From Dev

How do I open a file with Chrome from the command line?

From Dev

How do I get the default font from the command line?

From Dev

How do I upgrade releases from a Live USB with the command line?

From Dev

How do I install the latest version of cmake from the command line?

From Dev

How do I start the Privacy and Activity Manager from command line?

From Dev

How do I make pip available from command line mac?

From Dev

How do I build boost 1.55 from the command line with mingw?

From Dev

How do I control the WMP from command line/batch

From Dev

How do I open a WinSCP GUI session from command line?

From Dev

How do I add multiple "+" commands into less from the command line

From Dev

How do I download mail folders from command line?

From Dev

How do I install Chromium from the command line?

From Dev

How do I search for available packages from the command-line?

From Dev

How do I safely kill xscreensaver from a script/the command line?

Related Related

  1. 1

    How do I FTP multiple files from the command line?

  2. 2

    How do I delete everything in /var/mail/username from the command line?

  3. 3

    How do I execute a command in an iTerm window from the command line?

  4. 4

    How do I pass command line arguments to stack exec

  5. 5

    How do I pass a complex number from the command-line to sub MAIN?

  6. 6

    How do I pass a command-line program a list of files from a directory?

  7. 7

    How do I open a new command line window from an sh script and then pass in multiple commands

  8. 8

    How do I send raw ftp command?

  9. 9

    How do I detach from a controlling terminal from the command line?

  10. 10

    How do I pass commands to an external command, from bash?

  11. 11

    How do I show processes for a specific uid or username using command line in python?

  12. 12

    How do I drop a MongoDB database from the command line?

  13. 13

    How do I launch the Android emulator from the command line?

  14. 14

    How do I run a gui app from the command line?

  15. 15

    How do I read arguments from the command line with an MPI program?

  16. 16

    How do I open a file with Chrome from the command line?

  17. 17

    How do I get the default font from the command line?

  18. 18

    How do I upgrade releases from a Live USB with the command line?

  19. 19

    How do I install the latest version of cmake from the command line?

  20. 20

    How do I start the Privacy and Activity Manager from command line?

  21. 21

    How do I make pip available from command line mac?

  22. 22

    How do I build boost 1.55 from the command line with mingw?

  23. 23

    How do I control the WMP from command line/batch

  24. 24

    How do I open a WinSCP GUI session from command line?

  25. 25

    How do I add multiple "+" commands into less from the command line

  26. 26

    How do I download mail folders from command line?

  27. 27

    How do I install Chromium from the command line?

  28. 28

    How do I search for available packages from the command-line?

  29. 29

    How do I safely kill xscreensaver from a script/the command line?

HotTag

Archive