Results 1 to 2 of 2

Thread: How to Extract variable "file" and "path" of a variable

  1. #1
    Halle Berry is offline Junior Member
    Join Date
    Sep 2009
    Posts
    14
    Rep Power
    0

    Default How to Extract variable "file" and "path" of a variable

    Hello,

    I explained my problem of starting ... probably
    I retrieved via a variable form html:
    <input type="file" size="60" name="fichier"> <br>

    giving in the *. VBS, variable recovered:

    strvar = oIE.Document.TestForm.fichier.value

    but this variable is equal to: "path \ file" example c: \ temp \ zip file

    I would like to obtain separately two values:

    strPath = path (c: \ temp)
    strFile = file (zip file)

    if it has an idea. if possible

    Thank you

  2. #2
    Ingrid Bergman is offline Junior Member
    Join Date
    Sep 2009
    Posts
    13
    Rep Power
    0

    Default

    The split function you cut a string by a delimiter that you choose and send you back each piece in a table.

    Code:
    Code: 
    
    1.	Sun strMonTableau
    2.	Sun strMonChemin
    3.	strMonChemin = "c:  temp  zip file"
    4.	strMonTableau = split (strMonchemin, "")
    you will:

    strMonTableau (0) = "c:"
    strMontableau (1) = temp
    strMontableau (2) = "zip file"

    After that seems fairly trivial with UBound and concatenation of strings depending on what you really want.

Similar Threads

  1. Replies: 1
    Last Post: 03-29-2010, 07:01 AM
  2. i want a NRG "1305" printer driver on "Ubuntu"
    By Otto lechner in forum Linux/Free BSD
    Replies: 1
    Last Post: 11-24-2009, 12:55 PM
  3. Replies: 0
    Last Post: 10-06-2009, 12:05 PM
  4. Replies: 0
    Last Post: 09-25-2009, 05:57 PM
  5. 8500GT type GDDR3 memory - is the "path" Limit?
    By techno23 in forum Motherboards & Memory
    Replies: 0
    Last Post: 02-07-2008, 11:08 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
SEO by SubmitEdge

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48