Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 535a0488fa49367f81448aa2bc62a93d3e4c3a37
Ticket: 1292143fffffffffffffffffffffffffffffffff
glob does not accept backslash for directory separtor
User & Date: vincentdarley on 2005-09-16 00:16:29
Changes

  1. closedate changed to: "2005-09-15T17:16:29"
  2. closer changed to: "vincentdarley"
  3. icomment:
    Logged In: YES 
    user_id=32170
    
    Glob does handle windows native separators just fine, but
    you need to read the glob man page where you will see that
    glob interprets:
    
    \x  (backslash-x)
    
    as an attempt to match the character x.  Hence you will need
    to double up your backslashes if you want glob to interpret
    them as directory separators.  If you read the end of the
    glob man page, you will see this:
    
    Since the backslash character has a special meaning to the glob 
    command, glob patterns containing Windows style path
    separators need 
    special care. The pattern \fIC:\e\efoo\e\e*\fR is
    interpreted as 
    \fIC:\efoo\e*\fR where \fI\ef\fR will match the single
    character \fIf\fR 
    and \fI\e*\fR will match the single character \fI*\fR and
    will not be 
    interpreted as a wildcard character. One solution to this
    problem is 
    to use the Unix style forward slash as a path separator.
    Windows style 
    paths can be converted to Unix style paths with the command
    \fBfile
    join $path\fR (or \fBfile normalize $path\fR in Tcl 8.4). 
    
    which explains exactly your problem.
    
    
    
    
  4. login: "vincentdarley"
  5. mimetype: "text/plain"
  6. status changed to: "Closed"
  7. username: "vincentdarley"