最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

automation - Open file on removable drive with EXE using BATCH file - Stack Overflow

programmeradmin5浏览0评论

I'm trying to create a portable bat file that can open a ROM inside of an emulator regardless of drive letter.

I could create a shortcut using '"M:\Emulator\melonDS\melonDS.exe" M:\ROMs\Black\black.nds', but the letter drive would be randomized depending on what computer I put it into, and I'm not sure how to do this in a batch file.

To remove the emulator from the question, suppose I want to write a batch file that opens a specific text file on a SD card with a random drive letter in Notepad. I could hard-code the path into the batch file:

start "c:\windows\system32" notepad.exe M:\example_file.txt

But this assumes a specific drive letter. How could I make the bat file portable?

发布评论

评论列表(0)

  1. 暂无评论