cbones
asked on
File to ftp with a prompt for file name
Hello,
I was wondering if there can be an ftp script (batch file or vbscript) that runs and logs into a server, changes to a certain directory and then prompts the user for a file name to enter. The file name that the user enters will be the file that gets copied (ftp) to their local machine.
Thank you.
I was wondering if there can be an ftp script (batch file or vbscript) that runs and logs into a server, changes to a certain directory and then prompts the user for a file name to enter. The file name that the user enters will be the file that gets copied (ftp) to their local machine.
Thank you.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What did it display?
~bp
~bp
ASKER
It asks for a file name to transfer:
"Please enter filename to transfer:test.doc"
c:\>open 172.168.1.10 'open is not recognized as an internal or external command,
operable program or batch file
c:\>user
It also returned a windows error that I attached to this post.
"Please enter filename to transfer:test.doc"
c:\>open 172.168.1.10 'open is not recognized as an internal or external command,
operable program or batch file
c:\>user
It also returned a windows error that I attached to this post.
Are you sure you copied it and modified it correctly, I just tried it here and it seems to run the FTP program.
~bp
~bp
ASKER
It doesn't work on my Windows 7 machine. I tried it on a windows xp and it keeps prompting me for the password. I have tried with the password in the file and without the password in the file. I receive the message "invalid command" after typing in my password.
So it seems that it works on windows xp but I can't get past this message.
So it seems that it works on windows xp but I can't get past this message.
You may have to play around with the FTP subcommands a bit, depending on the FTP server that you you are connecting to. Different FTP server implementation can require slightly different approaches to connecting and authenticating.
What FTP server software are you using on the host server?
~bp
What FTP server software are you using on the host server?
~bp
ASKER
I had to remove the password field in the bat file. Once I removed the password field it now allows me to type in my password and transfers the file. I am trying to get the password stored in the field. It is a unix machine.
Thank you.
Thank you.
ASKER
Any reason why this wouldn't work from a Windows 7 machine?
No reason it shouldn't work on win7.
Try removing the word "user" from the second line of the section we send to FTP, that might not be needed for you FTP server.
~bp
Try removing the word "user" from the second line of the section we send to FTP, that might not be needed for you FTP server.
~bp
ASKER