PDA

View Full Version : How to compare two folders on a remote FTP server?


waynew
07-Jul-2005, 10:40 AM
Is it still true that BC2 can only make one FTP connection at a time and that means we can not compare two directories on a remote FTP site without have to download first? is there a better way to do this or a way around it?
thanks.

Chris
07-Jul-2005, 10:51 AM
BC should be able to compare two folders on the same FTP site.

BC only makes one FTP connection per base folder, so if you're comparing two folders from the same FTP server it will make two connections.

If you aren't able to compare two folders on the same site, what error messages do you get?

Chris
07-Jul-2005, 10:55 AM
Craig just corrected me.

BC makes one FTP connection per host/username combination. It should still work to compare two folders on the same FTP server.

waynew
07-Jul-2005, 12:12 PM
Hi,
I can load one side fine, which ever side that I try the first, it is twhich ever I try to load the second that errors, the error I got is "folder not available".
the two sides I am trying to load are:
"ftp://pdscp@unPRO5/cseFINCNV*SOURCE"
"ftp://pdscp@unPRO5/cseFINPRD*SOURCE"
is it because I am using the same host/username combination for both sides?

Chris
07-Jul-2005, 12:27 PM
Are you running the latest BC 2.3.1? Are you using passive mode FTP? To turn on passive mode, check "Passive Mode" in the FTP > Firewall/Proxy section of Tools|Options.

If those suggestions don't help, what FTP server software is the server running that you are connecting to?

Also, the problem might be related to the * in the path names. Do you get the same error if you load two folders that don't have * in the name?

waynew
07-Jul-2005, 02:30 PM
you said:"BC makes one FTP connection per host/username combination. It should still work to compare two folders on the same FTP server".
If so How do I compare two directories in BC2(side by side) on the same server use the same login ID and pass?

Chris
07-Jul-2005, 02:51 PM
It should work to enter the urls: ftp://username:password@server/folder1 and ftp://username:password@server/folder2 in the left and right paths in BC.

BC only makes one network connection to the FTP server in the above case.

This works for me to compare folders on a Linux server running the VSFTPD server, so this may be a problem specific to the server that you're using.

waynew
07-Jul-2005, 02:58 PM
Yes, I am runing BC2 version 2.3.1 and I have "Passive mode" selected. I am trying to connect to a Unisys server runs FTP called CPFTP. The * in the path name does not cause a problem, I can load path with a * in the name.

waynew
07-Jul-2005, 03:36 PM
Hi,
I tried what you suggested, same error for right side "folder not available"
left ftp://pdscp@unPRO5/cseFINPRD*SOURCE
right ftp://pdscp@unPRO5/cseFINCNV*SOURCE

LOG:
------------------------------------------
7/7/2005 5:19:37 PM Load Comparison: <->
7/7/2005 5:19:41 PM Stat> Connected.
7/7/2005 5:19:41 PM Recv> 220 Unisys 2200 FTP Server( cpFTP Version 2R5-1A102 )ready.
7/7/2005 5:19:41 PM Sent> USER pdscp
7/7/2005 5:19:41 PM Recv> 331 Password required for PDSCP.
7/7/2005 5:19:41 PM Sent> PASS ******
7/7/2005 5:19:42 PM Recv> 230 User PDSCP logged in.
7/7/2005 5:19:42 PM Sent> TYPE I
7/7/2005 5:19:42 PM Recv> 200 Type set to I.
7/7/2005 5:19:42 PM Sent> SYST
7/7/2005 5:19:42 PM Recv> 215 Unisys 2200 system type ( exec 47R2 ).
7/7/2005 5:19:42 PM Sent> PWD
7/7/2005 5:19:42 PM Recv> 257 "/ENTER-DIRECTORY-NAME" is current directory.
7/7/2005 5:19:42 PM Sent> FEAT
7/7/2005 5:19:42 PM Recv> 500 "FEAT ": command not understood.
7/7/2005 5:19:42 PM Sent> CWD cseFINPRD*SOURCE
7/7/2005 5:19:42 PM Recv> 250 CWD command successful : CSEFINPRD*SOURCE(1).
7/7/2005 5:19:42 PM Sent> PWD
7/7/2005 5:19:42 PM Recv> 257 "/CSEFINPRD*SOURCE(1)." is current directory.
7/7/2005 5:19:42 PM Sent> CWD /ENTER-DIRECTORY-NAME
7/7/2005 5:19:42 PM Recv> 550 CWD file status error /ENTER-DIRECTORY-NAME "Too long token (identifier or number)".
7/7/2005 5:19:42 PM CWD file status error /ENTER-DIRECTORY-NAME "Too long token (identifier or number)".
7/7/2005 5:19:42 PM Sent> TYPE A
7/7/2005 5:19:42 PM Recv> 200 Type set to A.
7/7/2005 5:19:42 PM Sent> PASV
7/7/2005 5:19:42 PM Recv> 227 Entering Passive mode (10,254,20,136,52,198).
7/7/2005 5:19:42 PM Sent> LIST
7/7/2005 5:19:42 PM Recv> 150 Opening ASCII mode data connection for CSEFINPRD*SOURCE(1).
7/7/2005 5:19:42 PM Recv> 226 Transfer complete.
7/7/2005 5:19:42 PM Load Comparison: ftp://pdscp@unPRO5/cseFINPRD*SOURCE <->
-----------------------------------------------
The next thing I did was I removed "username@" from the right side of comparesion, so now the right side only have "ftp://unPRO5/cseFINCNV*SOURCE", I tried that and it ask me to enter username password, so I did and it worked.
I think there is a bug in BC2 in how it tries to load the second directory. hopefuly the log below will help.
Log:
--------------------------------------------------------
7/7/2005 5:26:23 PM Stat> Connected.
7/7/2005 5:26:23 PM Recv> 220 Unisys 2200 FTP Server( cpFTP Version 2R5-1A102 )ready.
7/7/2005 5:26:23 PM Sent> USER anonymous
7/7/2005 5:26:23 PM Recv> 331 Password required for ANONYMOUS.
7/7/2005 5:26:23 PM Sent> PASS *******
7/7/2005 5:26:24 PM Recv> 530 Login incorrect "Illegal Userid or Password".
7/7/2005 5:26:24 PM Stat> Disconnected.
7/7/2005 5:26:35 PM Stat> Connected.
7/7/2005 5:26:35 PM Recv> 220 Unisys 2200 FTP Server( cpFTP Version 2R5-1A102 )ready.
7/7/2005 5:26:35 PM Sent> USER pdscp
7/7/2005 5:26:35 PM Recv> 331 Password required for PDSCP.
7/7/2005 5:26:35 PM Sent> PASS ******
7/7/2005 5:26:36 PM Recv> 230 User PDSCP logged in.
7/7/2005 5:26:36 PM Sent> TYPE I
7/7/2005 5:26:36 PM Recv> 200 Type set to I.
7/7/2005 5:26:36 PM Sent> SYST
7/7/2005 5:26:36 PM Recv> 215 Unisys 2200 system type ( exec 47R2 ).
7/7/2005 5:26:36 PM Sent> PWD
7/7/2005 5:26:36 PM Recv> 257 "/ENTER-DIRECTORY-NAME" is current directory.
7/7/2005 5:26:36 PM Sent> FEAT
7/7/2005 5:26:36 PM Recv> 500 "FEAT ": command not understood.
7/7/2005 5:26:36 PM Sent> CWD cseFINCNV*SOURCE
7/7/2005 5:26:36 PM Recv> 250 CWD command successful : CSEFINCNV*SOURCE(1).
7/7/2005 5:26:36 PM Sent> PWD
7/7/2005 5:26:36 PM Recv> 257 "/CSEFINCNV*SOURCE(1)." is current directory.
7/7/2005 5:26:36 PM Sent> TYPE A
7/7/2005 5:26:36 PM Recv> 200 Type set to A.
7/7/2005 5:26:36 PM Sent> PASV
7/7/2005 5:26:36 PM Recv> 227 Entering Passive mode (10,254,20,136,52,202).
7/7/2005 5:26:36 PM Sent> LIST
7/7/2005 5:26:36 PM Recv> 150 Opening ASCII mode data connection for CSEFINCNV*SOURCE(1).
7/7/2005 5:26:36 PM Recv> 226 Transfer complete.
7/7/2005 5:26:36 PM Load Comparison: ftp://pdscp@unPRO5/cseFINPRD*SOURCE <-> ftp://pdscp@unPRO5/cseFINCNV*SOURCE

Chris
07-Jul-2005, 03:46 PM
This definitely looks like an issue with the ftp server.

When it logs in, it says "/ENTER-DIRECTORY-NAME" is the initial directory, then it sets a different directory, when it changes back to "/ENTER-DIRECTORY-NAME" it fails, so something is wrong with the way the server is reporting directory locations.

We don't have access to a unisys ftp server to test with, so I doubt there is anything that we can do to fix this.

If you can provide us access to a test unisys cpftp server or if you can suggest a public unisys cpftp server, we will look into it further. If you do, you can send the server information to support@scootersoftware.com.

waynew
07-Jul-2005, 03:52 PM
More problems,
Now the individual file comparesion can only show the left side of the file and right side is blank.

Chris
07-Jul-2005, 04:17 PM
Is this comparing two folders on the same ftp server, or comparing a local folder to the ftp server?

Does the folder viewer list all of the files correctly? Do you see any error messages in the log when the right side file is blank?

13-Jul-2005, 02:48 PM
I was having this problem also. What I tried, and this might not be the reason it eventually worked, but I would chmod 777 all of the files in the directory that weren't showing up, and the directory itself. YMMV.