13 October 2018, 05:57 | #1 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Execute script without knowing name?
Is there a way of using the Execute command with wildcards, if you don't know the name of the script and it's the only file on the selected path? I would prefer NOT to use startup-sequence or anything like that.
|
13 October 2018, 06:05 | #2 |
Registered User
Join Date: Oct 2009
Location: Salem, OR
Posts: 1,767
|
Not sure, but thinking out loud here...
Could you redirect the output of the "dir" command into an environment variable and then execute that environment variable? (No idea if that would work; but it's late and that popped into my head. That and an image of Betty Grable playing Turrican. Maybe you shouldn't listen to me after all...) |
13 October 2018, 07:12 | #3 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Here is what I came up with, thanks to that old script I'd been working on concerning extraction of multiple files. I simply modified it to this:
Code:
LIST #? LFORMAT="EXECUTE *"%N*"" >RAM:Foebane EXECUTE RAM:Foebane |
13 October 2018, 08:52 | #4 |
Rumpig
Join Date: Aug 2006
Location: The bottom of the bottle
Age: 92
Posts: 243
|
What a silly idea.
While running scripts you don't know the name of, why not run scripts that you don't even know the purpose of. |
13 October 2018, 09:42 | #5 |
Registered User
Join Date: Jan 2002
Location: Germany
Posts: 6,985
|
This one does not nest execute commands:
Code:
execute "`list nohead quick`" |
13 October 2018, 10:27 | #6 |
This cat is no more
Join Date: Dec 2004
Location: FRANCE
Age: 52
Posts: 8,162
|
I think OP meant "how to execute scripts with a given pattern" (some software just creates files with dates, etc... useful in that case)
|
13 October 2018, 11:19 | #7 |
son of 68k
Join Date: Nov 2007
Location: Lyon / France
Age: 51
Posts: 5,323
|
Another way of doing this :
Code:
s:spat execute #? |
13 October 2018, 15:11 | #8 |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Some clarification:
I wanted my AmigaDOS setup to detect any scripts found on DH4: and run them upon startup, but it would be only one script, and the configuration would point to the zip archive I was going to use that contained the DH4: data. However, I had to use the same name for the execute command, so what I wanted was to be able to execute any lone script found on DH4: with any name. Basically, this is a carry-on from my thread about the "flickery objects" from Support.WinUAE, but it is still an interesting question, I think. Nesting script executions is a bad thing? I think I'm already doing it with my current setup, I didn't think there'd be a problem. I'm currently at a relative's for the weekend, so I won't be able to try out your suggestions until at least Monday morning, but any advice is still welcome. |
14 October 2018, 18:42 | #9 | |
Banned
Join Date: Sep 2011
Location: Cardiff, UK
Age: 51
Posts: 2,871
|
Quote:
Thanks, Meynaf! |
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Execute file without using execute | VoltureX | support.Apps | 3 | 01 December 2011 09:59 |
Execute script works but not after adding an icon with IconX as Default Tool. | e5frog | support.Other | 19 | 27 July 2010 10:23 |
I can't execute installer | paulo_becas | support.Apps | 5 | 01 March 2010 10:02 |
How to execute an intro with ASM ONE | W4r3DeV1L | Coders. General | 56 | 14 June 2008 13:00 |
Execute a script | frikilokooo | project.ClassicWB | 6 | 20 November 2007 11:36 |
|
|