Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy files from a server to another

Status
Not open for further replies.

b00gieman

Programmer
Jul 9, 2007
60
DE
Hi!
I have a script that uploads files to a server.However,I need to copy the uploaded files to another server.How do I do this?

Thanks!
 
Provided you have some sort of Domain permissions set up, you could use the FileSystemObject and set the anonymous user in IIS to an account that has domain permissions and permissions to a share on the second server.

Best MS KB Ever:
 
Got acces rights on the server.Now,I specify the server's adress like:

Code:
 SQLstr = "INSERT INTO dbo.shopping_TSR SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=\\tmav035a\\Test\\AssetDB_Test\\tmb2.xls;hdr=yes', 'SELECT * FROM [Sheet1$]')"

Printing this statement,it looks like this:

INSERT INTO dbo.shopping_TSR SELECT * FROM OPENROWSET('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=\tmav035a\Test\AssetDB_Test\tmb2.xls;hdr=yes', 'SELECT * FROM [Sheet1$]')

What should I do to the code so that the SQL statement looks like this: "Database=\\tmav035a\....."?

Thanks in advance!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top