Renaming .txt To .asp

i am trying to get around having to use querystrings, by having all my category id's made into folders, and all my products made into asp pages. so www.domain.com/2/product_1.asp

i know how to make the asp page and write it to a file but then how do i change the extension from .txt to .asp to make this still a dynamic page but with no need to request a product number.

View Replies


ADVERTISEMENT

Renaming Files

I am trying to find out how to rename a file. What I want is to take the orginal filename and put todays date and time in.

So something.txt would become 2008/01/17/0918something.txt

I have the following but it states "Path not found"

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
Dim fso, newName

set fso = CreateObject("Scripting.FileSystemObject")
newName = "c:"& now() & "something.txt"
fso.MoveFile "c:something.txt", newName
set fso = Nothing
%>

View Replies View Related

How Can I Renaming A File

How can I rename a file with aspupload or FSO before upload?
I looked for in documentation of these products, but I could not find
anything yet

View Replies View Related

Renaming A File

Is it possible to rename a file which a user uploads to the server?

I have a form which allows users to upload an image to a folder on the web
server. This works fine.

The form they submit takes their firstname, surname and the file.

However, I want the file to automatically be renamed to
firstname_surname.jpg (taking their firtname and surname from the form they
are submitting).

View Replies View Related

Renaming Method

I'm looking for a renaming method for folder objects.I have an ASP (JScript) application that I'm creating that acts as a document library. Users can upload files, create folders, etc.

Most places I go to basically have: copy, delete, move, create textfile as the only methods for the folder object - NOTHING about renaming.

View Replies View Related

Filename Renaming In ASP

am trying to upload a file and at the time try to rename the file to autogenerated name.

View Replies View Related

Renaming After Upload

ok i have the uploads working but when i try to rename with 'MoveFile' nothing seems to happen. this is my code:

View Replies View Related

Finding And Renaming Image.

Heres what im trying to do, I have mssql databse full of about 15,000 item ID codes. For Example of the ID Code:

The first 2 sometimes 4 letters represents the distributor name, the numbers are the item number and BX for example means Box.

DJ3726
DJ3847BX
DJ3743CD
PD2374
PD2334
PD4334BX

And I have about 15,000 images from my distributrs that mostly match up to the actual ID number, but still a lot dont match up because of a small extra letter like BX Or somehting like that.

So what ive done was write a code that Splits out the Manufature code for example DJ from DJ3726BX, and also the same for the item ID 3726 from DJ3726BX, So when I put thos to together I get just the manufature name and ID code instead of the extra crap I dont need.

And now I take just the Manufacutre name and ID and looping through my database and all of the (images via File Scripting Object).

Then I check to see if the manufacure code and ID is in the item name. For Example

Check if DJ74637
IS In: DJ74637BX.GIF

Then if it finds a match it gos and renames the gif for me. And it loops through untill its done.

My problem is that it just doesnt work, no errors no anything it just doesnt pick up any images when I can visualy go through my self and find some matchs.

Heres my code that I came up with so far ....

View Replies View Related

How To Uploading Images And Renaming Then

i want to give a option to client that they can upload there logo/images. how i can upload the images and when some upload the images i want to rename the images as the user name of the client or some autonumber. how i can rename the images.

View Replies View Related

Renaming Jpg Files On Upload

I'm basically doing the same thing except I have to upload the images from one web app and then load them from another so I've set up a virtual directory in IIS that points to the physical location where the files are.

Here is the relevant codecheck to see if a file existsMake sure the file type is a jpegMake sure the file is an acceptable sizeGenerate a filename based on the current date and timeSave the file to a local directory that a virtual directory points to on the web serverTry to display the image in an asp:image control by loading it from the webserver

Code:....

View Replies View Related

Renaming The Alert Message Box?

my page uses a javascript function which alerts users like this:

alert("An alert message");

how do I rename the message box in which this appears?

View Replies View Related

Renaming Variables Problem

i have a field that i'm extracting from a database, but when i take it out i want to rename it depending on what it is called. for example: Code:

View Replies View Related

Export To Excel - Multiple Sheets & Renaming Sheets

I'm developing a website for work that exports some reports to excel.
I am using the...

Response.AddHeader "Content-Disposition","attachment;filename=report.xls"
Response.ContentType = "application/vnd.ms-excel"

....strategy to do this. It works wonderfully except I cannot figure
out how to do two things:

1) specify a name for the worksheet that's exported (it names the
worksheet "blah.asp?q=123" when the user wants to see "Monthy Quotas"

2) generate multiple worksheets. The exported spreadsheet should have
about 6 tabs on the bottom that all contain different information in
the same report.

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved