[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: invalid extension



Sender: Scott Klement <sk@xxxxxxxxxxxxxxxx>


The "traditional" iSeries file system doesn't use "extensions" per-se. When you have a program, you don't have to end it with .EXE, it knows it's a program because it's an object of type *PGM. Similarly, a file doesn't have to end with .TXT or .DAT (or whatever else) it knows it's a file because it's an object of type *FILE.


When you access the traditional file system through the IFS, you use pathnames with "extensions", but they're not _really_ extensions. They're just file types. So you might have:

If you had a file called MYLIB/MYFILE with a member named MYMBR, the IFS pathname would look like this:

/QSYS.LIB/MYLIB.LIB/MYFILE.FILE/MYMBR.MBR

You can't rename MYMBR.MBR to end with .CMP or .TXT or anything else like that. It's an object of type *MBR, and the only valid extension is .MBR. Similarly MYFILE.FILE must always end with .FILE. You can't rename the extension.

On the other hand, if you use "root" or "QOpenSys" filesystems in the IFS for your tests, you won't have this problem, since they do use extensions in a Windows or Unix-like manner, instead of using the OS/400 object types.

Note that this error message has little or nothing to do with FTPAPI -- it's a message that's being sent to you from the FTP server. All FTPAPI does is relay it back to you so that you can read it for yourself.

If this doesn't answer your question, then please post a code snippet with enough info that I can reproduce the error on my system.

---
Scott Klement  http://www.scottklement.com


On Wed, 18 Jan 2006, BRoche@xxxxxxxxxxxxxxxxx wrote:


I am trying FTPAPI for the first time. The company i need to send a file
to would like us to rename it after the send is complete to prevent them
accessing an incomplete file. The extension they want me to use is .cmp.

I am testing this out on a local AS400 and receive message 501 Unknown
extension in database file name. Is there a place to define the extensions
or something i am doing wrong

The original name is formatted <xxx>timstamp.txt. renaming this to
<xxx>timestamp.cmp is where the problem occurs.



Bob Roche
Programmer/Analyst
(847) 482-2628
broche@xxxxxxxxxxxxxxxxx
--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubsribe from the list send mail
to majordomo@xxxxxxxxxxxxx with the body: unsubscribe ftpapi mymailaddr
-----------------------------------------------------------------------