Create Instance Of Filesystemobject
My server chokes when i try to use the filesystemobject. I'm running IIS v5.1 on XP Pro and it stalls when i try to create a text file or open one. Here's an example script that fails on the 3rd line.
dim filesys, filetxt
Set filesys = CreateObject("Scripting.FileSystemObject")
Set filetxt = filesys.CreateTextFile("C:InetpubwwwrootAIS estfile.txt", True)
filetxt.WriteLine("Here's the text...")
filetxt.Close
set filetxt = nothing
set filesys = nothing
Am not sure where to start troubleshooting .
View Replies
ADVERTISEMENT
why can't i create FileSystemObject on my LocalHost?I was trying to write a script in asp to get folder content.It's working just fine on my remote server, but not on my computer.I'm running win Xp Pro.
View Replies
View Related
I'm at a complete loss on what is causing this error. ActiveX Can't create object:"Scripting.FileSystemObject when executing the code below. Every example I've looked at is pretty much identical except for the file names.
What I am ultimately trying to accomplish is when clicking on a link check to see if a file with today's date exists if so link to it. If not, link to a file with yesterday's date.
View Replies
View Related
I have a script that looks for a phone number. I use an instr to see if
it finds a - for the phone number. I them grab the 3 characters before
and 4 after for the phone number. Works well, except when someone uses
the - in the text.How can look for the second instance of the - if the right 4 characters
past the - are not numeric?
View Replies
View Related
I have a Class and i want to be able to use its instance
example
public class Enrolltest : System.Web.UI.Page
{
MyClass mc = new MyClass();
mc.mymethod();
}
when i do this i get an error telling me there is no name space what should i do .,,.
i dont want to create a dll and add it to assembly and all that stuff.
View Replies
View Related
How to create an instance of Internet Explorer from classic ASP? I want
to create an instance of IE and then subsequently load a webpage through
this object.I am aware of creating web pages through scripting.
Long way to go before I sleep .
View Replies
View Related
How do i lanch a new instance of explorer from withing a current web page.I want to click on a link that take me to a new page in another "window" so that when i close it i see the old window.
View Replies
View Related
.asp, vbscript, ms Access
I want to display a list of records on my page, like this:
California - Los Angeles - Sheraton
- Los Angeles - Meridian
- San Diego - Mercury
Colorado - Denver - ..................
ie. only display first instance of California..
Can this be done..
View Replies
View Related
A three-tier user authentication system was running without a problem for almost a year and now is suddenly dysfunctional. We don't know of any changes to any of the servers. It's quite maddening. The details:
1) We know the COM+ app is instanced on the COM+ server (Win 2000). The component graphic spins when CreateObject is called.
2) The proxy is installed on an IIS server (Win 2000) with delivers the interface, written in ASP, to the client PC.
3) These are the error messages displayed when a method of DAMS is called:
View Replies
View Related
when i try to open an excel spreadsheet using the
following code, the process just hangs IF the spreadsheet
contains macros:
Set objXls = CreateObject("Excel.Application")
objXls.DisplayAlerts = False
objXls.Visible = False
objXls.Workbooks.Open my_excel_path '<-- hangs here
this worked on iis4, but since moving this to iis5 it
fails under the aformentioned circumstances. my guess is
that the macro security has something to do with it as a
dialog box will pop up if macro security is set to medium,
but i'm not sure this is really the problem. if it was,
what profile should change the macro security on the
server? when task manager is opened on the server to see
the hanging task, it shows SYSTEM as the process owner...
any ideas?
View Replies
View Related
How to set timeout for COM+ object instance? If any instance is running more than 15 minutes, I want COM+ application to kill the instance automatically. Is there any way to set this?
View Replies
View Related
need inserting the radio buttons that are checked. Ok I'm trying to insert the user picks but i need help on first renaming each set of radio buttons so they can select one from each group then i need help on inserting the ones selected. Code:
View Replies
View Related
If I have 30 of the same cmpycd in the column, it brings it all up. I think this is one of those IF/THEN things, but not sure how to impliment it in the code.
All I want to do is show one instance of each unique item that exists in the cmpycd column. If it exists 300 times, I just want to show it once. Then also show the compFN that is also in the same row.
I can make it count and show how many are of each, but I cannot seem to get it to display just one of each. Code:
View Replies
View Related
Here's what my code looks like...
View Replies
View Related
We are using .net 1.1 on windows 2003 server. This is we are facing in our
production server.
When we are doing the load testing we are getting the bellow error. While
the load testing this error is not coming frequently. When we run 20 threads
for 3 mins we are getting this error message 2 or 3 times. But this line of
code is executed by all the threads. Code:
View Replies
View Related
I am trying to attach files (all formats excel, word, including power point, pdf, any other embebbed files ...) on a form and copy them on to a specific folder. The code works only for text, word and excel formats but not for pdf, ppt, embbedded files. How could I add these files also?
I used this in the code:
Set oF= FSO.CreateTextFile("FolderNameFileName", True)
View Replies
View Related
i have made a site that allows users to log in and download or upload a file. but now i want to put in a drop-down menu so they can select which file they want to download. I want to populate the drop-down menu with a list of files in a directory using filesystemobject so it can change depending on what user logs in. can anyone give me some idea of how to populate the drop-down menu using filesystemobject.
View Replies
View Related
I am trying to see if an XML file exists and if it does then show the data in it if not do something else but can't seem to find the file. That definitely is the virtual path. Can you see anything wrong? Code:
View Replies
View Related
I just want to be able to access a simple text file but I cant not seem to figure it out I have used the FileSystemObject in Javascript before! Can anyone point out the error in my ways!Code:
<html>
<head>
</head>
<body>
<%
Dim FSO,FILE
FSO=Server.CreateObject("Scripting.FileSystemObject")
FILE=FSO.CreateTextFile("c: est.txt",true)
FILE.WriteLine("Some Text!")
FILE.Close
FILE=nothing
FSO=nothing
%>
</body>
</html>
View Replies
View Related
Can anyone tell me which protocol (http/s, RPC) or
service (w3svc) is used when using FileSystemObject in an
ASP page?
View Replies
View Related
I can't create textfiles.I could last week, and I can on my spare server. But this week, my production server freezes when trying to write to the file System.
set ObjTextStream = fs.CreateTextFile(str, fsoForWriting)
Where should I start to look for the difference? Both servers are W2KSP3. Both have IIS 5.I've run virus scans with the latest updates and no viruses found. I did receive an error about Windows File Protection needed to update some files, but those were ftp related.
View Replies
View Related
is there any way that you can delete blank lines from a file or prevent them from displaying
View Replies
View Related
I am trying to read a file (in ASP....my first ASP project) and i get the following error
Error Type:
Microsoft VBScript runtime (0x800A01B6)
Object doesn't support this property or method
/CP_Site_C/Default.asp, line 15
and line 15 is
fileStream = fso.OpenTextFile(filePath)
and the complete code is:
Dim fso, fileStream
Dim HitCnt, filePath
set fso = Server.CreateObject("Scripting.FileSystemObject")
filePath = "C:InetpubwwwrootCP_Site_CHitCount.txt"
fileStream = fso.OpenTextFile(filePath)
View Replies
View Related
Ok, I've got several different RAW LOGS, which I want to anylise, with the FSO.
However, I haven't got the faintest idea how to actually do anything (usefull!). For example, I want to be able to set the date of a traffic rapport (e.g display details from 15/03/2003 'till 17/03/2003). I also want to get all the usuall stuff like pageviews, visits, visitors...etc
Can anyone help me how to get all this, and still maintain somewhat of performance of my webpages? Code:
View Replies
View Related
This my code for practice:
<html>
<body>
<%
Response.Write("6 ")
dim fs,fname
set fs=CreateObject("Scripting.FileSystemObject")
set fname=fs.CreateTextFile("f: est.txt")
fname.WriteLine("Hello World!")
fname.Close
set fname=nothing
set fs=nothing
%>
</body>
</html>
but I couldn't create the text file at all with no error warning.How can I do this?
View Replies
View Related
I'm having intermittent trouble with the Scripting.FileSystemObject.Basically, I'm stress testing my ASP application and using the FSO to output lots of instrumentation/debug information to the same file.About 5 times within a 15 minute stress test, it returns "Permission Denied". I would think that this object is capable of asynchronous file open and writes.Has anyone else seen this issue and been able
to resolve it?
View Replies
View Related
I have serious problem with FileSystemObject, When I try to create object it saysInvalid Class String
It seems that FileSystemObject is removed or currupted. Could any know how can I re-install FileSystemObject it or fix this problem
View Replies
View Related
In my ASP (IIS 5.1), when I use oFile.OpenTextFile to open a file, the code stucks.
How can I fix this problem?
set oFile = CreateObject("Scripting.FileSystemObject")
strServerFileName = "files/fieldmap.txt"
If (oFile.FileExists(server.mappath(strServerFileName ))) Then
Const ForReading = 1
Set fSubmit = oFile.OpenTextFile(server.mappath(strServerFileNam e),
ForReading, False) --->>
end if
View Replies
View Related
I'm using the filesystemobject to list all files in a directory
Code:
Function lagsangliste()
dim fso, tekstmappe, file
set fso = Server.CreateObject("Scripting.FileSystemObject")
set tekstmappe = fso.Getfolder(Server.Mappath("/claus/tekster"))
response.write "<p class=sangliste>"
for each file in tekstmappe.files
Makelink_fullscreen(file.name)
Next
response.write "</p>"
End Function
But the filenames seems to come in random order.Is it possible to order them alphabetically?
View Replies
View Related
Can the FileSystemObject be used to return the document title?I am using a script to return all files in a folder, but would like to display teh document title instead of the filename. Is there a way to do this?
View Replies
View Related
i am having Permission problems with FileSystemObject.can any one guide me whats wrong?
set fs=Server.CreateObject("Scripting.FileSystemObject")
fcopy1=server.mappath("index_3.asp")
set t=fs.OpenTextFile(fcopy1,1,false)
x=t.ReadAll
t.close
'Response.Write("The text in the file is: " & x)
fcopy2=server.mappath("../site/samnik/content/index_3.asp")
set f=fs.CreateTextFile("fcopy2")
f.write(x)
Response.Write("<hr><a href=../site/samnik/content/index_3.asp>file is created</a>")
f.close
View Replies
View Related
Im trying to get this filesystemobject code to access a different server then the one its sitting on. I am a admin on both servers. Is there anyway you can do this?
dim fs,fo
set fs=Server.CreateObject("Scripting.FileSystemObject")
set fo=fs.GetFolder("")
Response.Write("Folder last accessed on: ")
Response.Write(fo.DateLastAccessed)
set fo=nothing
set fs=nothing
I havent heard of anyone trying this before, but I hope its possible.
View Replies
View Related
How do you set the permissions to allow filesystemobject? I have already gone into iis and set the write permissions but that did not do it.Code:
set fso = createobject("scripting.filesystemobject")
Set act = fso.CreateTextFile(server.mappath(file_being_created), true)
View Replies
View Related