navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
FrontPage Alternative
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

Filecopy

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> ASP and Database >> Filecopy
Page: [1]
 
accessman

 

Posts: 74
Joined: 9/13/2005
Status: offline

 
Filecopy - 4/28/2006 13:18:06   
Hi,

I have a question.

Function makecopy()
FileCopy Currentdb.Name, "C:\backuptemp.mdb"
End Function

It doesn't work,
the error message give out
Permission Denied

How can I make the copy itself? Thanks.
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Filecopy - 4/28/2006 13:56:37   
quote:

Permission Denied


You need to have write permissions to the directory where the file is to be written. And when running web page scripts, that usually means having the IUSER_machinename account with write privs.

Here is an example script I use to copy a file using FSO's:

set fs=createobject("scripting.filesystemobject") 
myOldDBFile = "C:\Inetpub\vhosts\mydomain.com\httpdocs\fpdb\myOldDB.mdb"
myNewDBFile = "C:\Inetpub\vhosts\vareview.com\httpdocs\fpdb\myNewDB.mdb"
fs.copyfile myNewDBFile, myOldDBFile


That help any?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to accessman)
accessman

 

Posts: 74
Joined: 9/13/2005
Status: offline

 
RE: Filecopy - 4/28/2006 15:40:10   
Hello, thank you very much.

It works.

I have another question.

Can we use fileystem object to do compact db when it make copy?

Follow your example:

set fs=createobject("scripting.filesystemobject")
myOldDBFile = currentdb.Name
myNewDBFile = "C:\compbackupDB.mdb"

fs.dbengine.compactdatabase myOldDBFile, myNewDBFile

fs.copyfile myNewDBFile, myOldDBFile

--------------------------------

I think that
we make the copy file, first.
then compact the copy file, right.

Is it correct steps?

Please let me know, thanks.
Thanks.

< Message edited by accessman -- 4/28/2006 15:47:57 >

(in reply to accessman)
rdouglass

 

Posts: 9280
From: Biddeford, ME USA
Status: offline

 
RE: Filecopy - 4/28/2006 20:52:08   
quote:

Can we use fileystem object to do compact db


Not that I'm aware of. There may be some script packages available on HotScripts.com

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to accessman)
Page:   [1]

All Forums >> Web Development >> ASP and Database >> Filecopy
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts