Getting only the filename ??

Ask a Question related to Macromedia Director Basics, Design and Development.

  1. #1

    Default Getting only the filename ??

    I'm creating a player that allows you to have multiple files stacked and play anyone of them. The problem now is i need to get only the filename out of the string...like C:\music\samples\test.mp3".. need to only have test.mp3... how do u get that alone ?...not very cofident in loops and logic like this...


    Vj
    vij010 Guest

  2. Similar Questions and Discussions

    1. Exporting Changes my filename
      Sometimes when I go to export a pdf the filename has somehow changed to a new file name. It doesn't happen all the time only sometimes
    2. split filename
      who can split this file name then subtract "kenny.pdf" file name--> C:\programfiles\funk\pdf\kenny.pdf
    3. Opening the same filename
      On my computer, (Windows XP FMP 5.5 & FMD 6) I can open two files with the exact same name that are stored in different directories. On my friend's...
    4. Get .PHP Filename?
      I've been looking thru my PHP functions and can't find what I need - is there a function that will tell me what .php file is currently executing? ...
    5. PC to Mac jpg Filename Problem
      I'm using PS 7.0.1 on XP Pro, and whenever I save a jpg file and burn it to disc, the filenames dislay completely different on a Mac. For example,...
  3. #2

    Default Re:Getting only the filename ??

    basically you use the backslash (\) as an item separator and pull the last item, which will be your filename.

    i.e.

    DefaultDelimiter = the itemDelimiter
    the itemDelimiter = "\"
    ActualFile = the last item of member("SourceFile").text
    the itemDelimiter = DefaultDelimiter
    member("Output").text = ActualFile


    this example uses 2 fields and a button as a demo (attached)



    [url]http://webforums.macromedia.com/attachments/filestripdemo.zip[/url]


    ============================
    Glen Palmer
    SafariTECH
    Cold Fusion Specialist
    [url]www.safaritech.com[/url]
    ============================
    SafariTECH Guest

Posting Permissions

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

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 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139