Link to home
Start Free TrialLog in
Avatar of chadmanvb
chadmanvb

asked on

Create a list of variables via a wildcard

I would like to create some variables that would list 3-4 files with the same name, but have different extensions.  So the user can click on a file such as:  \\server\location\testfile.xpi and then I can get a list of all the files with the same name but have different extensions such as:
X=\\server\location\testfile.xpi
Y=\\server\location\testfile.zip
Z=\\server\location\testfile.lsi

I currently have my script setup to where the user can click on one filename and create the x variable, but not sure how I can automate it to add the other 2-3 variables.
Thanks, Chad
Avatar of newyuppie
newyuppie
Flag of Ecuador image

there's the FileInfo class in system.IO, where you can separate filenames from extensions, or directory names, etc. its pretty useful
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of chadmanvb
chadmanvb

ASKER

getfiles() worked great.  Thanks, Chad