I need to rename a number of files. These are graphic jpg files, and I have an Excel table in which the initial names of these files are collected. For example, this is the name of one of these files taken from the table:

121026_DeviceData\63486504438_Osc.jpg

My problem is that the above name in my Excel file is a hyperlink, rather than a string. By directly addressing this hyperliknk from Mathematica a notebook with a mess inside opens, instead of the desired image. My question is:

How could I clean the text of this file name off from its hyperlink property, such that after the cleaning I get a pure string "121026_DeviceData\63486504438_Osc.jpg" instead of the hyperlink?

Added later: I have found such an approach:

(hyperlinkText/.Hyperlink->String)[[1]]


that returns me a string:

"121026_DeviceData\63486252521_Osc.jpg"

With this the question is answered, though somebody might propose a better solution.

-
Could you maybe upload a small sample of your Excel table somewhere, for testing purposes? –  Ｊ. Ｍ. Nov 12 '12 at 12:02
I have found such an approach: –  Alexei Boulbitch Nov 12 '12 at 12:21
I do not want to do this, since the table contains lots of things nothing to do with the question. No problem to operate with the table. It easily transforms into the table in Mathematica and can be operated further by the Mathematica methods. Now that I answered the question the rest is trivial. –  Alexei Boulbitch Nov 12 '12 at 12:30

Generating a XLS file for testing purposes:

Export["G:\\stackexchange\\hypli.xls",
"http://www.somehwere.org/121026_DeviceData/86504438_Osc.jpg"]}}}]


Then

Import["G:\\stackexchange\\hypli.xls"] /. Hyperlink[a_, _] :> a


gives

{{{"121026_DeviceData\\86504438_Osc.jpg"}}}

-