Copying A File Into Another Directory
I am creating a text file on the server which once created I need to then copy to another directory on the network.
View RepliesI am creating a text file on the server which once created I need to then copy to another directory on the network.
View RepliesI'm simply trying to copy an intranet database file (VesselConfig.mdb) into the same directory but rename it something else (VesselConfig2.mdb).
Here's the code I have so far: Code:
On one of my client's website customer's are uploading a few files each week using SA-FileUp. My clients wants that each uploaded file to be copied on another website he has got.
Any hint on how to copy one file between domains ? I was thinking about using AspHTTP which is installed on the original server but not on the other end.
how can i copy i file from server to client side ... any solution or can it be?
View Replies View RelatedI'm coding a page where you can download a lot of different files( 100-1000) but I don't want to code each file(linking and all) it would take weeks to do that. I tried with a database and asp code rding the databse but it not saving a lot of time since I got to complete the databse.
I wanna know if we can code with asp something to automaticly read each file and list them in html so I dont have to code 1000 x the samee thing.
I want to know is it possible to upload file into specific directory?
Actually I already find how to upload a file, but I can not choose/browse where I want to store/save the file.
Is it possible to search a specific directory for the most recent file and list when it was modified.
View Replies View RelatedI am working on a book selling website using ASP with an Access DB.
Basically i would like to have an image of each book in the DB to be displayed upon request in the website. So I guess what i would really like to know is
1. Can i store .jpg or .gif files in an Access DB?
2. Does it make sense to do this?
3. Would it be better to have some kind of pointer in the DB to a place in the file system where the image is stored? .......
does any one here know of a good way to to determine whether or not a
given path is a directory (e.g., "c:mydir") or a file (e.g., "c:mydir
myfile.txt")?
i started attacking this problem by using filesystemobject to check
whether or not a directory existed for the path. if so, it was a
directory path. if not, i checked to see if a file existed for it. if
so, it was a file path. Code:
Currently I am developping a internet "directory browser"
My page 'default.asp' has following entries:
CurrentPATH = Request("MyLink")
Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder(CurrentPATH)
Set oFolderContents = oFolder.Files
this works fine with 'default.asp?MyPath', where "MyPath" stands for i.e.
c: emp
but NOT with 'default.asp?MyFile', where MyFile stands for i.e.
c: empfile.txt
Is there a way to determine if the link contains a file or a path? Of course
you can check for a dot (after dot, normaly it is an extension, thus a
file), but I want to have it possible also to have dots in my directories...
Anybody?
If I don't set a vritual directory for the new application on the IIS (simpley copy the new application to a parent virtual directory), the new application's Global.asa file won't work. Right?
View Replies View RelatedI have a folder with eight or ten files that can be displayed in a browser. I need to display the file with the latest creation date. I imagine there is some kind of ASP function that could like at the filename's date and pick the file that meets the criteria. How can I do this?
View Replies View RelatedSet fileSystem = Server.CreateObject( "Scripting.FileSystemObject" )
Set file = fileSystem.OpenTextFile( "config.xml", 1, False )
It's saying that 'config.xml' doesn't exist. How can I reference this file? It's in the same directory as the file with the above code. Do I need to build the path somehow?
I used to have a little ASP file (classical ASP) that would show me the total file size used per directory. I didn't need it for many years and now that I do I seem to have lost it.
Does anyone have an classical ASP file/script that will loop through your filesystem and shows the total Mb's used per directory? I could write it myself I'm sure, but if someone has a script like this ready it would save me quite some time.
is there a way in asp that you can prepend a file to the beginning of page you access in a directory? i'm not talking about the include statement because you have to put it in on everypage manually. i know you can do this in cold fusion, but i don't know how to do it in asp or if its even possible.
View Replies View RelatedUsing ASP in a VBScript environment, how can I check the protection on a directory, or a
particular file?
I'm trying to run each file in a directory to be put into an include file line
I can't get anything to work me. Code:
The Include file '../main.asp' cannot contain '..' to indicate the parent
directory.
I think it is refering to the fact that I have a file called
communication.asp, and in that file there is a line:
<!-- #include file=../main.asp -->
This LINE should not contain '..' to indicate the parent directory
On the other hand, reading the message as it is written, we see that it
says: Code:
I have a form mail script that sends an email and then writes to a text file using Server.CreateObject("Scripting.FileSystemObject").
The problem I am having is that the information needs to be saved in a Password Protected Directory. When I try to save the info it gives me a permission denied error.
I had my hosting company change the permission on the directory and the script was working ok but now it isn't.
Is there a way to pass the username and password in the script so I don't have to worry about the hosting company messing this up?
I have 2 web servers both running win server 2003 with iis 6.0. On my
PROD server I have a virtual directory called CONV. It points to a
folder on the C drive of this PROD server.
On my TEST server, I defined a virtual directory called CONV. It points
to a share called prodservernameCONV. Note that the share name is
the same name as that of the virtual directory.
Using IIS on the TEST server, I can navigate to this CONV virtual
directory and via right mouse, click EXPLORE. I see all the content I
should but when I try to doubleclick on a file I get a message saying
"Security alert" - "your current security settings do not allow you to
perform system commands on this item".
I've tried everything I can think of on the security settings for the
physical folder on the PROD server. I extended EVERYONE from READ, etc.
to FULL CONTROL. I added the user called INTERACTIVE and gave it full
control. In short, I am stumped and guessing now.
Basically, I just want to avoid duplicating all the data files on my
PROD server over to my TEST server.
Can I implement session without global.asa file in my root directory....and is there any good site for sessions tutorial.
View Replies View RelatedI have written a script to update user information in the Active Directory using ADSI. Here is part of it:
Set User = GetObject("LDAP://<GUID=" & GUID & ">")
User.Department = DepartmentName
User.SetInfo
Set User = Nothing
This works fine unless DepartmentName is an empty string ("").
Then I get error 0x8007200B: "The attribute syntax specified to the directory service is invalid."
This happens with all the attributes I have tried, including TelephoneNumber
.
Do I need to delete the value of the attribute instead of setting it to an empty string? If so, how do I do it?
how I could copy the URL displayed on the browser..I want to copy this url and store it in the variable.
View Replies View RelatedI got a folder name f1 in server. I need to copy same folder and paste it in same root dorectory. Can any one help with asp code for it ....
View Replies View RelatedI am running into a problem for copying files between 2 different servers.
I am using the following lines of code to do that, but I get a 'permission denied' error
Set fso = Server.CreateObject("Scripting.FileSystemObject")
strSourceFile = "server1file1.doc"
strDestFile = "server2file1.doc"
fso.CopyFile strSourceFile,strDestFile, true
i have two tables.. i need to copy all the info from one table into another one, which might not be empty.table two includes the fields in table one, plus more.
how does one go about doing this? Also there are a few rows to be copied at a time.
Does anyone have an example? or can you refer me to any other threads?
Hi how do i copy a file from the server to the PC?
Const ForWriting=2
strPath = Server.MapPath("datos.xml")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set oFile = fso.GetFile(strPath)
Set tso = oFile.OpenAsTextStream(ForWriting)
sob=1
CopyFile "datos.xml", file://c:/datos.xml, sob
I'm not sure if this is the right place to put this but, I have 2 servers dev and prod. I want to copy files from dev to prod and I want to run this with windows scheduler every so often. I have an account on the prod and the script has to be run on dev. Is there a way that this can be done
View Replies View RelatedIs there a way, to make a page that gets info from a DB using scripting. then take that page, and copy it to another folder, BUT, not having the script there. making it become all html? so the page would contain html, but would be the result of what was
scripted. so i guess i am saying, that the page would become the source.
how do i copy a file from the server to the PC? I have this code but it says that type mismatch 'CopyFile'
<%
Const ForWriting=2
strPath = Server.MapPath("datos.xml")
Set fso = Server.CreateObject("Scripting.FileSystemObject")
Set oFile = fso.GetFile(strPath)
Set tso = oFile.OpenAsTextStream(ForWriting)
sob=1
CopyFile "datos.xml", file://c:/datos.xml, sob
%>
i have a "temp" table and i need to copy all records to the definitive table, since both tables as the exact fields how to do add the recorset "temp" to the recorset "final"? i know that to delet the all recorset is just to call it and then do a rs.delete, but i'm not shure about the code to do this.
View Replies View Relatedi want to copy a file(.jpg, .swf ...) on the web, to my server. how can i
write this function? it should take an url of a file and past the file to my
server in related folder.
I have looked on the net, but obvious not in the correct place for this.with this mega tourney site i am working on, i am thinking of several ways to do this efficiently.
so what i want to do, is when a new tourney is created, create a folder on my server that is named the id number of the tourney. this is the easy part.
next, i will have a temp folder with all the tourney files in it, that i would want to copy to the new folder. but i have not found a good way to copy these files.can someone stear me in the right direction?currently, i have been using querystrings to determine the correct id, and it is working fine. i just think that doing it this wat, would be easuer to keep each event seperate.