| Register | FAQ | Calendar | Search | Today's Posts | Mark Forums Read |
|
#1
| |||
| |||
| Hello, I have a path as follows: "Assets/Documents/Portfolio.pdf" I want to replace the file name, "Portfolio", by the content of the string NewName. How can I do this? Thanks, Miguel |
|
#2
| |||
| |||
| "shapper" <mdmoura@gmail.com> wrote in message news:1bb5f531-7b37-4923-958b-f1f3bd02b6e0@x35g2000hsb.googlegroups.com... > I have a path as follows: > > "Assets/Documents/Portfolio.pdf" > > I want to replace the file name, "Portfolio", by the content of the > string NewName. string strRawPath = "Assets/Documents/Portfolio.pdf"; string strNewName = "Shapper"; string strNewPath = strRawPath.Replace(Path.GetFileNameWithoutExtensio n(strRawPath), strNewName); -- Mark Rae ASP.NET MVP http://www.markrae.net |
![]() |
| Thread Tools | |
| Display Modes | |
In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.