I'd like to put an entry into the catalog which will check if there's a disc in a certain drive, and if so, run it (and if not, do nothing). How would I do this?
Unfortunately 'run cd' won't work on the forum, and 'run disc' or 'drive' didn't turn up anything relevant, so I don't know if this has been addressed elsewhere.
Thanks. I hate posting to the forums because it always ends up being something stupid I've overlooked, but yet again, it's hiding in my blind spot.
Running a disc with a script
-
zer0
- Posts: 2676
- Joined: 19 Jan 2009 20:11
Re: Running a disc with a script
To nudge you in the right direction, what you should be able to do is to use listfolder() to check if there are any items on that disc of yours. Then evaluate the output to check if it is equal to nothing (no disc in a drive or it's empty) and if it is not then act accordingly (presumably run an executable on said disc).
Reporting a bug? Have a wish? Got a question? Use search - View roadmap - FAQs: Forum + XY site
Windows 7/10
Always using the latest stable two-decimal build
Windows 7/10
Always using the latest stable two-decimal build
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: Running a disc with a script
I would try this:the_hyrax_lord wrote:check if there's a disc in a certain drive, and if so, run it (and if not, do nothing).
::if (exists("G:\")==2){msg "Yes";}else{msg "NO";}
XYplorer Beta Club