Using the LIST command with a wildcard on Vista's FTP server

Lately, I’ve been working on code that fetches EDI files from and FTP server using a VM running Windows XP. But yesterday rather than go through a VM I decided to use Vista’s FTP server for testing which turned out to be a bad idea.

I’m new to this code base so I’ve been stepping through it to see how it works and immediately started having problems where the app failed to download files off the server. The code is based on edtFTPnet source so I started stepping through it to see what was going on and found it uses FTP’s LIST command as follows “LIST *.NS”. That all seemed fine but I never got any results back. After double checking that the expected files were really there I jumped to the command line to test things out. In my first test I ran into the fact that LIST isn’t supported from Windows FTP.EXE command line tool since it requires PASV mode. That’s ok I’ll just use the DIR command:

Windows Vista FTP command line

No dice. While a plain DIR command works, specifying a wildcard of “*.NS” failed! What’s up with that? I fire up my XP VM and this works just fine under XP. It turns out this is a bug in Windows Vista’s FTP server. Thanks Noel for finding that link. Btw, we both got a nice laugh over the suggested workaround:

“To work around this problem, do not use an FTP LIST command together with a file mask argument.”

Yeah, thanks that’s a big help. On a side note, I just found out the broker our client is exchanging EDI files with is switching FTP server software, I just hope it’s not to Windows Vista.

2 thoughts on “Using the LIST command with a wildcard on Vista's FTP server

  1. I know no one who dares to run MS FTPs servers – it’s not their business, thus they don’t care much about them. There are many commercial and open source better alternatives.

  2. Yes, running an MS FTP server would not be wise. The target in my case is running on Red Hat but I thought I could get away with testing on Vista but no such luck. The fact that Vista has been out since January and this is still unpatched indicates how serious they take this problem, not.

Comments are closed.