Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Search for files over sFTP

 
Sridhar Santhanakrishnan
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am trying to import files, whose names match a particular pattern,over sFTP. I am using JSch for this. Any ideas to how to actually search through the files to get the initial list?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We ran across the same issue. Unfortunately you'll have to bring them back as a list of names (URIs) and perform a pattern match search in Java.

 
Sridhar Santhanakrishnan
Ranch Hand
Posts: 317
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm. On another note, my client is Windows and the server is UNIX.I plan to use RSA public/private key authentication.

How do I generate the key on windows? Can i generate the key on the UNIX server and use it on the windows client instead?
 
Martijn Verburg
author
Bartender
Posts: 3275
5
Eclipse IDE Java Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any keygen software ought to work, many people use UNIX command line or a tool called 'puttY'
 
T Mishra
Ranch Hand
Posts: 108
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am trying to import files, whose names match a particular pattern,over sFTP. I am using JSch for this. Any ideas to how to actually search through the files to get the initial list?


With JSCh you can use a glob pattern to filter files. http://epaul.github.com/jsch-documentation/simple.javadoc/
Assuming, that the files - test.txt, text.jpg, test.pdf, image.gif
are present at the remote server location
location - /user/home/testDirectory

You can use this to filter files with prefix 'test'.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic