- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Microsoft
- >
- Re: Need script to ftp single file
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 06:52 AM - last edited on тАО09-03-2014 06:08 PM by Maiko-I
тАО09-03-2014 06:52 AM - last edited on тАО09-03-2014 06:08 PM by Maiko-I
Need script to ftp single file
Hello Expert ,
I have to run the ftp comand from my local desktop to ftp 1 single file.
This file is critical to copy for the application patch installation & upgrade.
Below are the steps that i am following.Can i make this commands in a script.
Open cmd window on MSCM Server
D:
cd MSCM/DSSO
(or DSSO)
ftp -nv srvname
user <userid>
bin
prompt
cd /law/c0xxyy/gen/perms_files
pwd
dir
get DSSO.jar
quit
Thanks & with regards,
Vishal
P.S. This thread has been moved from HP-UX > Languages and Scripting to Microsoft > general. - Hp Forum Moderator
- Tags:
- ftp
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 01:29 PM
тАО09-03-2014 01:29 PM
Re: Need script to ftp single file
A quick Google search yielded some good results: http://lmgtfy.com/?q=windows+ftp+batch+file
Basically it will require 2 files.
The contents of the first file, names ftp-file.script, should be:
open srvname
userid
password
lcd /D "D:\MSCM\DSSO"
bin
prompt
cd /law/c0xxyy/gen/perms_files
pwd
dir
get DSSO.jar
bye
The second file, named ftp-file.bat, should be:
ftp -i -s:ftp-file.script
Then, when you want to FTP the file, just run the ftp-file.bat file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 01:42 PM
тАО09-03-2014 01:42 PM
Re: Need script to ftp single file
I did the same as you said .Created 2 files 1 with name ftp-file.script on to which i copied the content & run the command ftp -inv -s:ftp-file.script from the command prompt and got the below error ;
C:\Users\VPatankar>ftp -inv -s:ftp-file.script
Error opening script file ftp-file.script.
Transfers files to and from a computer running an FTP server service
(sometimes called a daemon). Ftp can be used interactively.
Please suggest ...
Thanks Vishal
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 01:51 PM
тАО09-03-2014 01:51 PM
Re: Need script to ftp single file
Are both files in the same directory?
The error indicates that it can't find the ftp-file.script file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 02:12 PM
тАО09-03-2014 02:12 PM
Re: Need script to ftp single file
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 02:15 PM
тАО09-03-2014 02:15 PM
Re: Need script to ftp single file
When i run the batch file i got the below error...
C:\Users\VPatankar\Desktop>ftp -i -s:ftp-fil
ftp> open srv0536
Connected to srv0536.netaspx.com.
220 srv0536 FTP server (Version 4.2 Mon Dec
User (srv0536.netaspx.com:(none)):
500 'USER ': command not understood.
Login failed.
ftp> userid "kvaze"
Invalid command.
ftp>
ftp> password "passw0rd"
Invalid command.
ftp>
ftp> lcd /D "D:\MSCM\DSSO"
lcd local directory.
ftp>
ftp> bin
200 Type set to I.
ftp> prompt
Interactive mode On .
ftp> cd /law/c123da/gen/perms_files
530 Please login with USER and PASS.
ftp> pwd
530 Please login with USER and PASS.
ftp> dir
530 Please login with USER and PASS.
530 Please login with USER and PASS.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 02:20 PM
тАО09-03-2014 02:20 PM
Re: Need script to ftp single file
In my example the lines with userid and password are the actual userid and password. You do NOT specify "user userid" or "password passw0rd" you just specify kvaze and passw0rd on each line.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 02:37 PM
тАО09-03-2014 02:37 PM
Re: Need script to ftp single file
C:\Users\VPatankar\Desktop>ftp -i -s:ftp-fil
ftp> open srv0536
Connected to srv0536.netaspx.com.
220 srv0536 FTP server (Version 4.2 Mon Dec
User (srv0536.netaspx.com:(none)):
500 'USER ': command not understood.
Login failed.
ftp> kvaze
Invalid command.
ftp>
ftp> passw0rd
Invalid command.
ftp>
ftp> lcd /D "D:\MSCM\DSSO"
lcd local directory.
ftp>
ftp> bin
200 Type set to I.
ftp> prompt
Interactive mode On .
ftp> cd /law/c123da/gen/perms_files
530 Please login with USER and PASS.
ftp> pwd
530 Please login with USER and PASS.
ftp> dir
530 Please login with USER and PASS.
530 Please login with USER and PASS.
Please suggest...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО09-03-2014 02:43 PM
тАО09-03-2014 02:43 PM
Re: Need script to ftp single file
below is the screen shot for the same...
Choose Environment
------------------
0. c0gart
1. c0tyfs
2. c0artd
3. c11eda
4. c10cfda
s. aspx Shell
l. View Customer names
x. Logout
Choice? :
here i have to give the option