Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Dynamic Folder Naming

Status
Not open for further replies.

toddsalcedo

Programmer
Jul 2, 2001
49
US
I have an ASP page that creates a folder and uploads a file into it in one step. The folder is named the same as the file, but I need to remove the extension information (.doc).

What can I use that will remove the last 4 charatcters, I know how to show certain characters, but not remove them.
 
strPath = Left(strCompleteName, Len(strCompleteName)-4)

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
i have something similar, but i take the path, split it on "/" or "\" depending if you're using virtual or absolute paths, use FSO to make sure the entire tree structure is there, if not it will make all the subfolders. then at the end of the loop i do something similar to as above and make a sub folder with the filename - extention then write the file into it.

if you'd like a copy of this code please let me know i'll happily post it in here.


[thumbsup2]DreX
aKa - Robert
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top