Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

How to? Return list of SELECTed files

Aug
2,799
144
Code:
select set theFiles=(*.*) & set thefile
...returns not all of the files that I have selected,
but after pressing return,
just the last file that I have selected is stored in the environment variable thefiles.

Code:
thefiles=hb.prg

How can I store a list of the selected files into the environment variable thefiles using the SELECT command?

1777224350092.webp


Joe
 
For that you might need a custom command. I did this.

Code:
alias setthem `do f in %$ (set TheFiles=%theFiles %f)`

Then

Code:
select setthem (*.txt)

1777230275101.webp


After pressing Enter, I had this.

Code:
v:\> set theFiles
 wprcommands.txt wprtimes.txt wtthemesfortcmd.txt xxxfiles.txt
 
Even easier:

Code:
select `set theFiles=` [*.btm]

1777232662431.webp


Code:
v:\> set theFiles
 coupon.btm coupon2.btm coupon3.btm
 
Back
Top