View Full Version : Converting File
Hi All,
pls does any one know how I can resolve this problem;
I have a Server in which I save a flat file daily using the days date like(10-4-03.txt), but I want a SCRIPT that will convert the flat file name to something like(report.txt) and display the file names on a web page.
Am sorry I earlier mistakingly sent this to Client Side development
Thanks
Abd
glenngv
04-10-2003, 01:35 PM
http://www.devguru.com/Technologies/vbscript/quickref/filesystemobject.html
whammy
04-12-2003, 12:35 AM
Yeah, most of our business partners use flat files (fixed width format, even!), so I have become a master of FileSystemObject by necessity! ;)
It can do pretty much whatever you want... another good reference:
http://www.w3schools.com/asp/asp_ref_filesystem.asp
I learned about everything I know from there... ;)
Morgoth
04-12-2003, 05:02 AM
Adb, I see only a few issues I hope you see to.
1) The <date>.txt files will only change to report.txt if it's the correct day and the page that does the renaming is accessed by some user... So that means, when the user visits the page that you want <date>.txt to change to report.txt, it will have to check to see if any of the <date>.txt files = Now() and if it does, change it's name to report.txt (copying over the old report.txt)
2) If one of the <date>.txt page's is never renamed to report.txt because of no one accessing the site on that day, then that file is still there, and will not be deleted... Are you going to remove these manually, or are you going to write it into your script to also search for any scripts that are less than Now()
So now that I have thought about some issues that you might of already thought about, are their any else that you want to tell us? If you explain to us how you are going to go about it, it can allow us to throw in our own two cents.
It sounds like an interesting idea, and I can't think of anything I would use it for, but I would like to help you if you have any problems getting it working.
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.