Extracting filename
I have a filepath in a edit box as follows:
C:/data/swiff/uploads/image1.jpg
I need to convert to
image1.jpg
then
s:/swiff/uploads/image1.jpg
I have used
image1 := edit1.text;
image_new := extractfilename(image1);
I would expect the result to be images1.jpg but I get
/data/swiff/iploads/image1.jpg
What am I missing here please
Cheers
SteveW
--
Steve Warburton
0161 217 2200
07760 164990
Stevew@Parkforce.com
C:/data/swiff/uploads/image1.jpg
I need to convert to
image1.jpg
then
s:/swiff/uploads/image1.jpg
I have used
image1 := edit1.text;
image_new := extractfilename(image1);
I would expect the result to be images1.jpg but I get
/data/swiff/iploads/image1.jpg
What am I missing here please
Cheers
SteveW
--
Steve Warburton
0161 217 2200
07760 164990
Stevew@Parkforce.com
This discussion has been closed.
Comments
forward slashes not backslash.
How do I replace all "/" with "\"
cheers
Take a look at the Delphi utility StringReplace() in the SysUtils file.
--
Regards,
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com