I have this problem with file system objects, and its driving me barmy
basically what i want to do is to create a text file on the server and then copy that file to a users directory.
I have set up the createText file and it works fine ( it takes records from a database and writes it to a web page), but i can't seem to copy the file. I get errors saying path not found (even though i've written it properly) and loads of othe weird errors
(a) do i have to set up two different objects, or can i run them both together
here is my code:
file_being_created= rs("id"
& ".htm"
set fso = createobject("scripting.filesystemobject"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
Set act = fso.CreateTextFile (server.mappathfile_being_created), true)
and then it creates the file.
At this point i want to copy the file
is this right ->
fso.CopyFile "path of file", "c:\m files"
set fso = nothing
or
do i have to set up a 2nd fso?
hope this makes sense
basically what i want to do is to create a text file on the server and then copy that file to a users directory.
I have set up the createText file and it works fine ( it takes records from a database and writes it to a web page), but i can't seem to copy the file. I get errors saying path not found (even though i've written it properly) and loads of othe weird errors
(a) do i have to set up two different objects, or can i run them both together
here is my code:
file_being_created= rs("id"
set fso = createobject("scripting.filesystemobject"
Set act = fso.CreateTextFile (server.mappathfile_being_created), true)
and then it creates the file.
At this point i want to copy the file
is this right ->
fso.CopyFile "path of file", "c:\m files"
set fso = nothing
or
do i have to set up a 2nd fso?
hope this makes sense