Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to ftp a pds library(each members contents) drom mainframe to my pc. I wrote the following code:

@ftp -i -s:"%~f0"&GOTO:EOF
open myip
get 'hlq.2ndlq.3rdlq.4thlq(*)' T_NORMAL.txt

When I run it it opens and shuts down the dos window. I can't seem to find what's wrong.

share|improve this question

migrated from Apr 24 '13 at 19:04

This question came from our site for professional and enthusiast programmers.

Open a terminal window via Start -> Run cmd, OK (if you have no Run option on the Start menu, press Windows-R instead). Then cd to the folder with your batch file and run it. You should be able to see the error messages that way, and that should help you find what's wrong. – Aaron Miller Apr 24 '13 at 21:40

You can't do (*) to get all the members, nor yet into one file.

If you treat the PDS as a directory/folder and then use MGET *, and you should have all the members downloaded, with their original 1-8 character names.

share|improve this answer
MGET *? Where do I indicate the path there? – csbl_81 Apr 24 '13 at 18:21
You treat the PDS as a directory so you "change directory" to it. So "CD your-PDS". You already have PWD so you should be able to confirm you have it. Then the MGET *. However, if your window is closing even when there is a PAUSE in the batch file, then there may be something fundamental wrong with your MS-DOS batch file. Try a PAUSE as the very first statement in the batch file. If it still closes then you'll need to look elsewhere. If it doesn't, move the PAUSE until you get the closing effect, and you'll know where to concentrate. – Bill Woodger Apr 24 '13 at 18:31

If this is an MS-DOS batch file, then add "pause" on the last line of this script and run it. This way it will allow you to have a look at the results before you close the DOS window.

share|improve this answer
It doesn't work. It closes anyway. – csbl_81 Apr 24 '13 at 18:22

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.