A simple request for help (I hope)

This is a discussion on A simple request for help (I hope) within the TCL forums in Programming Languages category; 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 ...

Go Back   Application Development Forum > Programming Languages > TCL

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 08-25-2008, 04:39 PM
scottwevans@gmail.com
Guest
 
Default A simple request for help (I hope)

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.
Reply With Quote
  #2  
Old 08-25-2008, 05:36 PM
Cameron Laird
Guest
 
Default Re: A simple request for help (I hope)

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.

Reply With Quote
  #3  
Old 08-25-2008, 06:02 PM
billposer@alum.mit.edu
Guest
 
Default Re: A simple request for help (I hope)

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".
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 05:33 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.