cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Voyager
Voyager
442 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
Highlighted
Moderator
Moderator
424 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
Highlighted
Moderator
Moderator
425 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

Highlighted
Voyager
Voyager
414 Views
Registered: ‎07-28-2008

Great thanks,

0 Kudos