Hello,

Still fairly new to all this.

I'm looking for an example on how to let the user select a program name and path, and declare it variable A.

There is more to this request, but I'd trying to figure this out on my own and not beg for a solution to be given. Just a nudge in the right direction.

SteveyD

>I'm looking for an example on how to let the user select a program name and path, and declare it variable A.

Sorry, I'm not quite following the problem. Do you want to execute user selected program name?

Yes, thats the first part of this.

Allow the user to select the directory and program name.

example;

the user clicks a button, and navigates to the program_name.exe file.

That directory/subdirectory(etc)../program_name.exe once selected becomes something like "user_progA = (the directory/subdirectory/program_name.exe)"

I'm still having a hard time trying to explain it., Sorry./

Maybe a different explanation;
In the example below, How would you allow the user to define the location of "test.txt" instead of forcing it to only exist as "c:\\test.txt"

# using  System;  
# using  System.IO;  
#   
# class  MainClass  
# {  
#         public  static  void  Main(string[]  args)  
#         {  
#                 FileInfo  file  =  new  FileInfo("c:\\test.txt");  
#   
#                 //  Display  directory  information.  
#                 DirectoryInfo  dir  =  file.Directory;  
#   
#                 if  (dir.Exists)  
#                 {  
#                         Console.Write("Directory  attribute  list:  ");  
#                         Console.WriteLine(dir.Attributes.ToString());  
#                         Console.WriteLine("Directory  contains:  "  +  dir.GetFiles().Length.ToString()  +  "  files");  
#                 }  
#   
#         }  
# }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.