Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: File Creation


Message #1 by =?iso-8859-1?q?sky=20limit?= <skylimit7772002@y...> on Sun, 13 Oct 2002 11:33:59 +0100 (BST)
Hi Guys

If anyboby can tell me 

1)How to create a file in asp with name "SomeName" concatenated with current date and time with some text in it.

2) Intially  we have to see that if file exists with  that name concatenated with current date and time then delete that file and
create the 
new file with same name.







---------------------------------
Get a bigger mailbox -- choose a size that fits your needs.

Message #2 by "Imar Spaanjaars" <Imar@S...> on Sun, 13 Oct 2002 12:55:19 +0200 (CEST)
Try this:

http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=create+a+text+file+with+asp
Then open the first result and see how to create a file and see whether it
already existed or not.
Not too hard, wasn't it.......? That's what search engines are made for,
if you ask me.

Imar






>
> Hi Guys
>
> If anyboby can tell me
>
> 1)How to create a file in asp with name "SomeName" concatenated with
> current date and time with some text in it.
>
> 2) Intially  we have to see that if file exists with  that name
> concatenated with current date and time then delete that file and
> create the  new file with same name.
>



Message #3 by =?iso-8859-1?q?Rajit=20Singh?= <rajitsingh@y...> on Sun, 13 Oct 2002 12:53:09 +0100 (BST)
Hi Imar
Well I have to save file name  with current date and
time and how do u do that(i mean concatenation of
current time and date with file name)




 --- Imar Spaanjaars <Imar@S...> wrote: >
Try this:
> 
>
http://www.google.com/search?hl=en&lr=&ie=UTF-8&oe=UTF-8&q=create+a+text+file+with+asp
> Then open the first result and see how to create a
> file and see whether it
> already existed or not.
> Not too hard, wasn't it.......? That's what search
> engines are made for,
> if you ask me.
> 
> Imar
> 
> 
> 
> 
> 
> 
> >
> > Hi Guys
> >
> > If anyboby can tell me
> >
> > 1)How to create a file in asp with name "SomeName"
> concatenated with
> > current date and time with some text in it.
> >
> > 2) Intially  we have to see that if file exists
> with  that name
> > concatenated with current date and time then
> delete that file and
> > create the  new file with same name.
> >
> 
> 
> 
> 
> 
> ---
> 
> Improve your web design skills with these new books
> from Glasshaus.
> 
> Usable Web Menus
>
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
> r-20
> Constructing Accessible Web Sites
>
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
> r-20
> Practical JavaScript for the Usable Web
>
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
> r-20

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
Message #4 by "Imar Spaanjaars" <Imar@S...> on Sun, 13 Oct 2002 14:27:21 +0200 (CEST)
You can use ASP's Now() function to get the date and time.

You may need to use the Replace function to strip stuff like :

Check out the VB Scripting docs at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/html/vbscripttoc.asp?frame=true
for more information on using those functions.

Cheers,

Imar


> Hi Imar
> Well I have to save file name  with current date and
> time and how do u do that(i mean concatenation of
> current time and date with file name)
>
>


Message #5 by "TomMallard" <mallard@s...> on Sun, 13 Oct 2002 07:41:10 -0700
Hmmm, the creation date for the file is a part of it's header, saving the
date is pretty redundant. Why not get creation date when retrieving the file
instead of adding and parsing out the date manually into the filename? You
can use the folder object to then scan files within a folder for creation
date when searching...

dim objFSO, objFile, strPath, dateCreated
set objFSO = CreateObject("Scripting.FileSystemObject")
set objFile = GetFile(strPath)
dateCreated = objFile.DateCreated

'do something with the date...

set objFSO = nothing
set objFile = nothing

tom mallard
seattle

-----Original Message-----
From: Imar Spaanjaars [mailto:Imar@S...]
Sent: Sunday, October 13, 2002 5:27 AM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: File Creation


You can use ASP's Now() function to get the date and time.

You may need to use the Replace function to strip stuff like :

Check out the VB Scripting docs at:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/script56/ht
ml/vbscripttoc.asp?frame=true
for more information on using those functions.

Cheers,

Imar


> Hi Imar
> Well I have to save file name  with current date and
> time and how do u do that(i mean concatenation of
> current time and date with file name)
>
>




---

Improve your web design skills with these new books from Glasshaus.

Usable Web Menus
http://www.amazon.com/exec/obidos/ASIN/1904151027/ref=nosim/theprogramme
r-20
Constructing Accessible Web Sites
http://www.amazon.com/exec/obidos/ASIN/1904151000/ref=nosim/theprogramme
r-20
Practical JavaScript for the Usable Web
http://www.amazon.com/exec/obidos/ASIN/1904151051/ref=nosim/theprogramme
r-20



  Return to Index