cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
legendbb
Voyager
Voyager
599 Views
Registered: ‎07-28-2008

How to run Disk Label test from tcl?

Jump to solution

Windows OS, I run into path length limit issue started using subst.

But every rerun of my script fails at this command because path replacement if alreay used (SUBSTed).

I had to run "exec subst V: /d" to remove it.

I'm wonder how to create a .tcl script to test if a label is already exist, so to prompt to remove before proceed. I can do this in .bat by using exist.

Please comment,

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
hongh
Moderator
Moderator
581 Views
Registered: ‎11-04-2010

Hi, @legendbb ,

Hope the below example can be helpful:

set t "C:"
if { [file exist $t ] } {
puts "exist"
} else {
puts "Not exist"
}

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

2 Replies
hongh
Moderator
Moderator
582 Views
Registered: ‎11-04-2010

Hi, @legendbb ,

Hope the below example can be helpful:

set t "C:"
if { [file exist $t ] } {
puts "exist"
} else {
puts "Not exist"
}

-------------------------------------------------------------------------
Don't forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------

View solution in original post

legendbb
Voyager
Voyager
571 Views
Registered: ‎07-28-2008

Great thanks,

0 Kudos