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\testfi le.xpi
Y=\\server\location\testfi le.zip
Z=\\server\location\testfi le.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
X=\\server\location\testfi
Y=\\server\location\testfi
Z=\\server\location\testfi
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
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
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
getfiles() worked great. Thanks, Chad