| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| I want to use tcl to launch a shell script. The script takes an argument. I've written stuff like this in the past, but this script takes a directory name as the arguement. The number and names of directories is always changing. When I execute the proc that will execute the script, I'd like to be prompted with a display that lets me select the directory from a list and provide that directory name as an agruement to the shell script. I'm feelin' the love out there. I know someone will help. If you want to provide the actual script/proc that would be great too. Thanks... Scott E. |
|
#2
| |||
| |||
| In article <4a969fb1-4a9c-460a-9493-af1e68393780@s50g2000hsb.googlegroups.com>, <scottwevans@gmail.com> wrote: >I want to use tcl to launch a shell script. The script takes an >argument. I've written stuff like this in the past, but this script >takes a directory name as the arguement. The number and names of >directories is always changing. When I execute the proc that will >execute the script, I'd like to be prompted with a display that lets >me select the directory from a list and provide that directory name as >an agruement to the shell script. > >I'm feelin' the love out there. I know someone will help. If you want >to provide the actual script/proc that would be great too. |
|
#3
| |||
| |||
| Something like this? set dirname [tk_chooseDirectory -title "Choose a directory" - initialdir "./"] if {$dirname == ""} { puts "Directory selection cancelled." return } if { [catch {exec /bin/ls $dirname} listing] != 0} { puts "Listing of directory $dirname failed." return } #If we get here the list of files is in the variable "listing". |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.