moudey / Shell

Powerful context menu manager for Windows File Explorer
https://nilesoft.org
MIT License
2.88k stars 96 forks source link

[Question] Creating File with custom name #443

Closed lunatic-gh closed 3 months ago

lunatic-gh commented 3 months ago

I'm wondering... If i use io.directory.create("SomeName"), it will open a prompt asking for the name (where SomeName is the default input). Is there something like this for files as well? I'm asking because the default context menu does exactly this for both folders and files, while using io.file.create("SomeName") does not open a a prompt at all.

RubicBG commented 3 months ago
item(title='Blank File' image=\uE10E cmd=io.file.create('blank', null, true))

or

item(title='New File' image=\uE10E cmd=if(input("Nilesoft Shell","new file name...")==1, io.file.create(input.result), msg('no input')))
lunatic-gh commented 3 months ago

Awesome, thanks!

Additionally, is there any information specifically about what "commands" exist, like for example io.file.create(), or are those taken from some specific lang (dotnet or smt)? Because i couldn't find any info about this on the wiki, but maybe i was just blind?

lunatic-gh commented 3 months ago

NVM, found exactly this on the wiki under "functions". Thanks!