View previous topic :: View next topic
|
Author |
Message |
khadar78 Warnings : 1 New User
Joined: 29 Apr 2008 Posts: 16 Location: Mysore
|
|
|
|
Hi,
I have a requirement to fetch a file details from the server.
The suggestions came up were:
To get the file size or check the content of the file and read the data from the file..
Could anyone tell me. if there are commands in FTP for the above requirement?? |
|
Back to top |
|
|
superk
Global Moderator
Joined: 26 Apr 2004 Posts: 4652 Location: Raleigh, NC, USA
|
|
|
|
Use FTP to connect and logon to the server. Enter HELP to get a list of the FTP commands supported on that server. Then you can can use HELP <command> to further describe each command. |
|
Back to top |
|
|
khadar78 Warnings : 1 New User
Joined: 29 Apr 2008 Posts: 16 Location: Mysore
|
|
|
|
I tried searchin commands, but found with LS
LS = listing of contents in the current directory.
But i want to check if file 'X' is present in a directory.
If present find the content of that file.
After LS command it list downs all the files in spool.
Please let me know if anyone has inputs.. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
There are no FTP commands to do what you want -- FTP is not a scripting language, it is very specific to file transfers. However, you could connect to the server, issue an LS (or DIR) command to get the list of files, and then the next step could parse the file list looking for the particular file and its size; the third step could then be another FTP customized by the results of the second step to download the file. You will have to either use ISPF browse or edit to find the content of the file, after it has been transferred. |
|
Back to top |
|
|
khadar78 Warnings : 1 New User
Joined: 29 Apr 2008 Posts: 16 Location: Mysore
|
|
|
|
Thanks Robert for your valuable response. |
|
Back to top |
|
|
|