Newsletters Subscriptions Media Kit About Us Contact Search Home

mgo
OS/400 Edition
Volume 3, Number 41 -- June 25, 2003

Running Client Commands under FTP


Hey, Ted:

FTP's cd command changes the working directory on the server machine. The lcd command changes the working directory on the client machine. The ls and dir commands show the contents of the working directory on the server machine. But there are no lls and ldir commands to show what's in the working directory of the client machine. Do you know of an alternative?

--Bobby


There is an alternative, but the exact command to use depends on which operating system is running the FTP client.

If you're using any of the widely used operating systems that are named after devices that allow you to see through walls, try this:

!dir

The exclamation point, which computer wienies pronounce as "bang," tells the FTP client to run the dir command on the client machine.

On the other hand, let's say that you're running the FTP client on an iSeries. The command "dir" means nothing to OS/400, so you must use a CL command instead. Here are some commands that might serve your purpose if you're working in the 0 name format.

! wrkobj   *curlib/*all
! dsplib   *curlib

If you're using name format 1, you might use this command instead.

! wrklnk /home/jsmith

However, I prefer to press the F21 key to get a command line window.

Let me add a few notes for your information.

  • Entering the lcd command without parameters displays the name of the working directory on the client machine. Running the cd command without parameters displays an error message.

  • Under OS/400, the syscmd FTP command is a longer version of the bang command. I assume this longer version is for people who like to type.

  • The MS-DOS FTP client allows you to use the forward slash (/) instead of the usual backslash (\) to separate directory names.

lcd   c:/temp
  • However, when you use bang to run an MS-DOS command, you must use the backslash.

!dir   /o:d   c:\projects\p*.*   >c:\temp\mydir.txt
  • The MS-DOS client does not require a space after the bang character. OS/400 does.

--Ted


Sponsored By
WORKSRIGHT SOFTWARE

600 Billion

That's how much a recent independent study estimated U.S. businesses spend on dirty data. How much of that 600 billion is spent by your company? Cleanse your dirty ZIP Codes and mailing addresses with our software and save big bucks.

WorksRight Software, Inc.
Phone: 601-856-8337
E-mail: software@worksright.com
Web site: www.worksright.com


THIS ISSUE
SPONSORED BY:

Advanced Systems Concepts
WorksRight Software


BACK ISSUES

TABLE OF
CONTENTS

Debugging External User-Defined Functions

Running Client Commands under FTP

Reader Feedback and Insights: Pondering the Meaning of 'Contiguous'


Editors
Howard Arner
Joe Hertvik
Ted Holt
David Morris
Shannon O'Donnell

Managing Editor
Shannon Pastore

Publisher and
Advertising Director:

Jenny Thomas

Advertising Sales Representative
Kim Reed

Contact the Editors
Do you have a gripe, inside dope or an opinion?
Email the editors:
editors@itjungle.com

Copyright © 1996-2008 Guild Companies, Inc. All Rights Reserved.