Jump to content


Photo

VMS FileName Extension


  • Please log in to reply
3 replies to this topic

#1 David Goossens

David Goossens
  • Members
  • 6 posts
  • Location:
    Belgium

Posted 20 June 2007 - 11:01 AM

Hello,

I have an issue with the file extension with VMS FTP Server. I believe that the same issue has already been reported for SmartFTP client (subject "conversion of filename extensions (VMS)" from theinoz).

[20070620 10:51:51] 200 VMS OpenVMS V7.3 on node XXXX.YYYY.
[20070620 10:51:51] FEAT
[20070620 10:51:52] 502 FEAT is unimplemented.
[20070620 10:51:52] TYPE I
[20070620 10:51:52] 200 TYPE set to IMAGE.
[20070620 10:51:52] REST 0
[20070620 10:51:52] 502 REST is unimplemented.
....
[20070620 10:51:57] 150 Opening data connection for DISK$PROD:<XXXXX>B18155955.TXT;1 (XXX,YYY) (1022 bytes)
[20070620 10:51:57] 1019 bytes transferred. (2,25 Ko/s) (441 ms)
[20070620 10:51:57] 226 Transfer complete.
[20070620 10:51:57] RNFR B18155955.TXT;1
[20070620 10:51:57] 350 File DISK$PROD:<XXXXX>B18155955.TXT;1 will be renamed.
[20070620 10:51:57] RNTO <-.export_a>/B18155955.TXT;1
[20070620 10:51:58] 550-Failed to rename file(s) to <-.export_a>/B18155955.TXT;1
[20070620 10:51:58] 550 file specification syntax error

A suffix ;1 has been added to the real filename.

Thanks in advance for your help,
David

#2 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 20 June 2007 - 11:32 AM

Hello ..

The RenameFile method uses the filenames you pass into its arguments. Remove the ;1 from the filename before you pass it to the RenameFile method.

Regards,
SmartFTP

#3 David Goossens

David Goossens
  • Members
  • 6 posts
  • Location:
    Belgium

Posted 20 June 2007 - 12:31 PM

Hello,

You are absolutely right: the filename on the rename function must be without ;1. This bad filename on the FTP trace is coming directly from a directory list of SmartFTP. The rename is not the problem. It is the VMS filename decoded in Smart FTP.

The process :
1. I open a directory on the VMS FTP Server with SmartFTP Library.
----FTPC.ChangeDirectory(Partex200_FTPPath)
----FTPC.ReadDirectory();
----Paraut_FTPDir:=FTPC.Directory
2. I read the directory content and for each file, I rename the filename.
----FOR i:=0 TO Paraut_FTPDir.Count-1 DO
----BEGIN
---- CLEAR(laut_FTPItem);
---- laut_FTPItem:=Paraut_FTPDir.Item(i);
---- IF (laut_FTPItem.Type=1) THEN
---- BEGIN
---- IF (FTPC.RenameFile(laut_FTPItem.Name,
---- MakeFilePathFTP(Partex200_FTPBackupPath,laut_FTPItem.Name))<>0) THEN
---- ERROR('error during rename');
---- END
----END

The problem is not the rename function but that the var laut_FTPItem.Name returning the filename + ;X with VMS server. The type of this var is 'SmartFTP FTP 1.5 Type Library'.FTPItem. If I try to download or delete the file, I have the same problem. The filename in FTP Item var is not correct when reading on a VMS FTP Server.

I have worked for other customers on other FTP servers (not VMS) with SmartFTP : it was always working perfectly.

This issue is similar than subject "conversion of filename extensions (VMS)" from theinoz on the client forum.

Can you check again with these information?

Thanks in advance,
David

#4 mb

mb

    Developer

  • Administrators
  • 11521 posts
  • Gender:
    Male
  • Location:
    Worldwide

Posted 20 June 2007 - 01:37 PM

You have to manually remove the version information from the filename returned by the FTPItem.Name property.

if(servertype = VMS) then
remove version info from filename

Regards,
SmartFTP




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users