[Closed] B4J Applet to retrieve all images

Beja

Expert
Licensed User
Longtime User
Hi
I need to display all images in my computer with all possible extentions (png jpg bmp...etc)
It's like dir *.jpg
Reward
 

billzhan

Active Member
Licensed User
Longtime User
Do you mean a B4J web app (ajax or websocket) ? Select the folder(s) and view the images from web browser.
 

Beja

Expert
Licensed User
Longtime User
Hi
Thanks for the question..
The result could be placed on web browser or any other container.. The app will crowl through all directories and folders in the computer and collect the images.. Then display them.
 

billzhan

Active Member
Licensed User
Longtime User
Do you need to crawl and update the DB regularly?

If server is windows and you need to monitor and search files, you may try the desktop search tool Everything. I don't know if it's possible to access this software from B4J.
 

udg

Expert
Licensed User
Longtime User
Hi,
try the prompt command "dir /b /s c:\*.png" and similarly for other types (note: have a look at other options for the dir command).
This command could be issued through the JShell library to collect the intented list of files which could then be processed in any way (even diplaying..).

udg

Edit: attached a working skeleton.
Sorry, I took for me the funniest part of this project leaving out the boring one..eheheh
 

Attachments

  • IC_test.zip
    1.6 KB · Views: 283
Last edited:

Beja

Expert
Licensed User
Longtime User
Hi udg,
Just tried the solution and I got a blank screen. There are many images in my computer but didn't show up.
 

udg

Expert
Licensed User
Longtime User
Hi Beja,
did you try "-1" as the timeout value? In my example code it was set to 50secs probably too low for your case.

Edit: re-reading your post, you tried my code thinking it was the complete solution to your initial request? I limited myself just at the searching step but if you'd like me to complete the project just tell me and I'll do it for you. Non problem.
 
Last edited:

Beja

Expert
Licensed User
Longtime User
Hi udg
Will try it soon.. Now travelong.
Thinking about something like first seitching to the root directory (c:\) then search for the images.
 
Top