26 January 2009 at 14:46
There are frequent times when a full file path is extracted from a database or passed to your function and you need the file name. This handy Classic ASP one liner can be used to pull out the filename part of the path in a single hit.
sFilePath = “C:/websites/mywebsite/images/my-logo.jpg”
sFileName = Right(sFilePath, Len(sFilePath) - InStrRev(sFilePath,"/"))
InStrRev Function
Remember that although the InStrRev function searches the string from the end, it still returns the location of the search string counting from the start.
You could wrap this in a function with the path as a parameter and it could easily be extended to require the directory separator as an additional parameter to deal with different path formats.
Tags: ASP | Code | FilePath | Filename
Posted in ASP Code Snippet | No Comments
14 January 2009 at 10:20
It’s a hot topic at the moment and everyone is talking about how the looming recession has hit businesses across the country. But how has it affected a small web design company in rural Stroud, Gloucestershire?
HostPipe has been going for nearly five years now and we have reached a certain amount of stability within the web design marketplace. What has become apparent is companies (and individuals) are now looking to save money by shopping around whether it be when getting a website designed or any other product. This has increased the number of web enquiries coming in essentially making the market for designing websites much more competitive.
A great deal of the web design enquiries are also coming from the local Stroud and surrounding Gloucestershire areas which is incredibly promising. Supporting local businesses is one of the key factors in helping all get through a recession relatively unharmed, propping up the local economy and keeping the money circulating.
One key thing to remember when buying a website is that it is not an extravagance, having a website designed is actually a key weapon in your marketing armoury and cutting back on a website could directly affect the success of your business. A website does not have to be all singing all dancing from the start either. If your budget is only £500 then ask what type of web site can be designed for £500. A good web design company will make suggestions of features for your website that will fit your business model and help promote your business online in the most efficient means possible. You can also add on the ‘wants and widgets’ onto your website at a later date as funds become available.
Most of all, if you are a local Stroud or Gloucestershire based company we are more than happy to pop out see you and discuss your web design requirements further. And don’t forget, the Stroud Pound is one of the strongest currencies going!!
Posted in Website Design | Web Design | No Comments
Social Network
Recent Posts
Categories
Archives
RSS Feed