Thank you so much, the first thing i tried was the browseFileDirec tory method, and couldn't make it work, i hope some day they fix that method. Well i guess imma try this one.
$ start C:\Users\user\D esktop\
it's easier to sort files by creation file and simply press "home" key to get last one selected. If not i will try the filechooser to see if you can move or rename files with it.
Thank you....
User Profile
Collapse
-
Hi, thank you for helping me.
Do you mean using start like this? i just tried this way and still open a new explorer window every time.
Code:private void openFile(File f) { try { String comand = "cmd.exe /c start explorer.exe /select," + f.getAbsolutePath(); Runtime.getRuntime().exec(comand); } catch (Exception
Leave a comment:
-
How to select file on an open explorer window with java
i'm trying to make a program that downloads some files, and now i want to open the folder (on the windows explorer) where those files are (it's always the same folder) and select the last file that was downloaded, i found this code to do it on java:
Code:private void openFile(File f) { try { Runtime.getRuntime().exec("explorer.exe /select," + f.getAbsolutePath()); } catch (Exception
-
Yes. It switches the active tab to that new tab.
I couldn't find any way to do it so i had to use this chrome extension to force chrome to never switch to new tabs:
https://chrome.google.com/webstore/d...ajdbikelkdcmcl
But that solution could stop working in the future, so if you know any way to do it in the code itself i'll be really thankful....Leave a comment:
-
Open a file in google chrome with cmd without swapping to the new tab
I'm new here and I'm looking for help, I found this way to open files on google chrome with java:
private void abrirVideo(Stri ng archivo) {
File arch = new File(archivo);
String comando = "cmd.exe /c start chrome \"" + (archivo) + "\"";
try {
String s = arch.getParent( );
Runtime.getRunt ime().exec(coma ndo, null, new...
No activity results to display
Show More
Leave a comment: