rye74 Posted February 7, 2023 Share Posted February 7, 2023 I was wondering if the checkbox "Remove file extension and folder path" in the Edit Emulator screen details tab could be separated into two separate check boxes. One checkbox to remove the file extension and one checkbox to remove the folder path? Instead of doing both actions with one check box. I've run into a situation where i want to pass the filename and ext but no path and I can't seem to do it because the way its setup, Please let me know if this is feasible or if there is another way I could accomplish what I'm trying to do. Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted February 7, 2023 Share Posted February 7, 2023 40 minutes ago, rye74 said: I've run into a situation where i want to pass the filename and ext but no path and I can't seem to do it because the way its setup, Please let me know if this is feasible or if there is another way I could accomplish what I'm trying to do. If your case use is passing it to a batch file, in the batch file you use %1 to reference the full parameter. Instead, UNCHECK the "Remove file ext..." and in the batch file use %~nx1 in place of %1. This will result in just the fileName.ext. To test, create a batch (test.bat) with the following: @echo off echo %1 echo %~nx1 pause Drag and drop any file onto "test.bat". The resulting Command Prompt will display the full path to the file on the 1st line and just the fileName.ext on the 2nd line. Quote Link to comment Share on other sites More sharing options...
rye74 Posted February 7, 2023 Author Share Posted February 7, 2023 (edited) Hi Joe. Thanks for the response. I am using a bat file and do use %~nx1 and did figure out awork around by appending the .ext but i have other apps on different machines which use the same bat file and those changes break my other apps. Not really a big deal but It seems backwards to me to handle two operations with a single checkbox. I don't know if its thats something the devs would wanna change that though. Edited February 7, 2023 by rye74 Quote Link to comment Share on other sites More sharing options...
C-Beats Posted February 7, 2023 Share Posted February 7, 2023 That box was made pretty much for MAME and Arcade emulators that just need the file name passed. This is the first time I've heard someone needing them separated for any emulator Quote Link to comment Share on other sites More sharing options...
JoeViking245 Posted February 7, 2023 Share Posted February 7, 2023 Appending the .ext was my 1st thought. 1 hour ago, rye74 said: I don't know if its thats something the devs would wanna change that though. The best way to set this in motion is to create a bitbucket request. At the top of this page click HELP & SUPPORT and then REQUEST A FEATURE. Once completed, add a link to it here to gain exposure and get upvotes. In the interim, you can always create a 2nd batch file for your other 'emulators' that [would] use the same batch file and use %1. Or get super crazy and add a Default Command-Line Parameter for the different emulators using the same batch file. Example "path", "file", "fileExt". Then in the batch file, add if %1==path (set param=%2) if %1==fileExt (set param=%~nx2) if %1==file (set param=%~n2) echo %param% Quote Link to comment Share on other sites More sharing options...
rye74 Posted February 7, 2023 Author Share Posted February 7, 2023 (edited) Yeah, ill have to create another bat for my other app. I believe off the top of my head that this would be useful with batch jobs (my case here), the m2 emulator or model3 emulator and Mame and Openbor. I know in Playnite you can pass just the name of the file with or without the ext or path or any combination. Edited February 7, 2023 by rye74 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.