• Post Reply Bookmark Topic Watch Topic
  • New Topic

get file from String  RSS feed

 
joseph prabhu
Ranch Hand
Posts: 162
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello joseph here

this are the list of files got through ftp protocol.
how can i get the file name as upd0025768122008112225.txt through any methods of String

08-12-08 12:06PM 50 upd0025768122008112225.txt
08-12-08 12:06PM 50 upd0025768122008112349.txt
08-12-08 12:06PM 111 upd0025768122008112408.txt
08-12-08 12:06PM 107 upd0025768122008112458.txt
08-13-08 04:27PM 107 upd0025768122008112460.txt

itis very urgent
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If your file names are always the same length then you could use the substring method.
If your file names are different lengths but don't contain spaces, you could use the lastIndexOf and substring methods.
If your file names are different lengths and contain spaces, but are always preceeded by date, time and size fields, you could use the indexOf and substring methods. There's probably a regex pattern to do it as well.

Have a go and let us know what you come up with.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!