Post a reply

Options
Add an Attachment

If you do not want to add an Attachment to your Post, please leave the Fields blank.

(maximum 10 MB; please compress large files; only common media, archive, text and programming file formats are allowed)

Options

Topic review

unaligned

Scripting unix 'find' command, or the like.

Greetings,

Before I get to my question, I'll provide some context. I'm looking to write a program for Windows (preferably in Java, but if it's possible using the WinSCP .NET framework, I am not opposed to using VB.NET or C#) that provides a list of files in its UI which reside on a remote Unix server that match a specific string pattern - such as EXAMPLE.TXT or EXAM* - and which may be several directories deep from the current working directory. Because of this last requirement, 'ls' will not work.

I know how to script the copies themselves, but gathering a list of files from the remote server and placing it into the program's UI so that a user may elect whether to copy them is confusing me. I don't want to actually show the directory structure, such as you see in the WinSCP interface, but rather I simply want to show a list of the absolute paths with filenemes of those files that match the string pattern. Once I have the list, the rest of the coding that allows the user to manipulate it should be trivial.

I have performed searches in the documentation and the forums for a command similar to Unix's 'find' that can return a list of files in the the current directory itself, or further into the directory structure. However, I have so far been unable to find something that would allow me to write a program with a UI for Windows.

Any insight anyone may have into this would be greatly appreciated.

Thanks