From: Sooraj S on
Hi,

How can i check whether a directory exists in a path ??
From: Alexandre Ferrieux on
On Jun 25, 5:17 pm, Sooraj S <soorajspadmanab...(a)gmail.com> wrote:
> Hi,
>
> How can i check whether a directory exists in a path ??

man n file
From: Sooraj S on
Hi Alexandre Ferrieux,

I tried that but it says invalid command "man"..my expect script is
like this..

-------
#!/usr/bin/expect
set search_dir /home/sooraj/xpd
if {man -n $search_dir} {
puts "Directory exists"
}

----

Pls help me


From: Alexandre Ferrieux on
On Jun 25, 5:35 pm, Sooraj S <soorajspadmanab...(a)gmail.com> wrote:
> Hi Alexandre Ferrieux,
>
> I tried that but it says invalid command "man"..my expect script is
> like this..
>
> -------
> #!/usr/bin/expect
> set search_dir /home/sooraj/xpd
> if {man -n $search_dir} {
>      puts "Directory exists"
>
> }
>
> ----
>
> Pls help me

No, I was suggesting to read the manpage for the [file] Tcl command,
by typing "man n file" into the unix shell on a typical distrib.

If you don't know what this means, probably a better approach would be
to read

http://www.tcl.tk/man/tcl8.5/TclCmd/file.htm

Specifically look for [file isdirectory].

-Alex
From: drscrypt on
On 6/25/2010 11:51 AM, Alexandre Ferrieux wrote:
> No, I was suggesting to read the manpage for the [file] Tcl command,
> by typing "man n file" into the unix shell on a typical distrib.
>
> If you don't know what this means, probably a better approach would be
> to read
>
> http://www.tcl.tk/man/tcl8.5/TclCmd/file.htm
>
> Specifically look for [file isdirectory].
>


Given his step by step questions, I think he may benefit more from a
basic intro to tcl or to computers and programming.


DrS