ASP Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsProgramming Languages - MoreASP Programming
Receive the tools necessary to be the rock star of your field. Our 12-month program teaches you the evolving world of multi-channel marketing as well as the complex issues and opportunities found in the industry.

ASP Free and Iron Speed Designer are giving away $5,500+ in FREE licenses. Iron Speed's RAD CASE toolset can save up to 80% of your coding time. One free license per week, one perpetual license per month!
Download and Activate to enter!

Web development can be a daunting task, even for specialists. There is a lot of information to absorb and a lot of technologies to learn in order to manage a superior website. When trying to learn the ropes, developers need a reliable source to introduce new ideas that can be easily implemented. When working on large projects, even web veterans may run into a technology or an aspect of a technology that they are unfamiliar with.

Learn More!


Download to Enter
| Contest Rules

Tutorials | Forums

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old January 31st, 2012, 10:41 PM
thall89553 thall89553 is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Budapest
Posts: 1,683 thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 17 h 22 m 25 sec
Reputation Power: 65
Send a message via Yahoo to thall89553
CopyFile not working...

I have a website on a Godaddy shared hosting account. On a page I have this code

Code:
<% 
dim filesys
set filesys=CreateObject("Scripting.FileSystemObject")
source = Server.mapPath("../images/local-directory/temp.jpg") 
destination = Server.mapPath("../images/local-directory/21") 
If filesys.FileExists(source) Then

filesys.CopyFile(source, destination)

End If
%>


If open this page I get a Server 500 error. If I remove the filesys.CopyFile from within the If statement and put a redirect instead it works, telling me the file does exist. But not sure the right syntax for the CopyFile
__________________
Today the world, tomorrow the universe...

Reply With Quote
  #2  
Old February 1st, 2012, 04:30 PM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 18th Plane (13500 - 13999 posts)
 
Join Date: Jun 2003
Posts: 13,894 Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 4 Days 15 h 10 m 20 sec
Reputation Power: 4227
Does godaddy provide the filesystem object? A lot of hosts used to block the fso because of security concerns.

Somewhere in the msdn library scripting documentation is the reference documentation for the filesystem object.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi

Reply With Quote
  #3  
Old February 1st, 2012, 07:02 PM
thall89553 thall89553 is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Budapest
Posts: 1,683 thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 17 h 22 m 25 sec
Reputation Power: 65
Send a message via Yahoo to thall89553
I believe that Godaddy does support fso as I have this code that works and creates directories.
Code:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject")
folder = Server.mapPath("../../shops") & "/" & session("owner") & "/" & Session("directory") 
objFSO.CreateFolder(folder)
folder = Server.mapPath("../../shops") & "/" & session("owner") & "/" & Session("directory")& "/thumbs" 
objFSO.CreateFolder(folder)
Set objFSO = Nothing


Quote:
Originally Posted by Doug G
Does godaddy provide the filesystem object? A lot of hosts used to block the fso because of security concerns.

Somewhere in the msdn library scripting documentation is the reference documentation for the filesystem object.

Reply With Quote
  #4  
Old February 2nd, 2012, 11:17 AM
Doug G Doug G is offline
Grumpier Old Moderator
Dev Shed God 18th Plane (13500 - 13999 posts)
 
Join Date: Jun 2003
Posts: 13,894 Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level)Doug G User rank is General 49th Grade (Above 100000 Reputation Level) 
Time spent in forums: 1 Month 3 Weeks 4 Days 15 h 10 m 20 sec
Reputation Power: 4227
If it helps here's the reference for the CopyFile method

http://msdn.microsoft.com/en-us/lib...v=vs.84%29.aspx

Also turn off show friendly http errors in your browser and see if you then get the actual error message. And check that your web server has write permission to the target directory.

Reply With Quote
  #5  
Old February 2nd, 2012, 06:01 PM
thall89553 thall89553 is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Jan 2004
Location: Budapest
Posts: 1,683 thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level)thall89553 User rank is Second Lieutenant (5000 - 10000 Reputation Level) 
Time spent in forums: 5 Days 17 h 22 m 25 sec
Reputation Power: 65
Send a message via Yahoo to thall89553
Hello Doug, I was able to see the actual error message:


Microsoft VBScript runtime
error '800a0046'
Permission denied
/mydomain.com/copy.asp, line 26


I logged into GoDaddy's hosting control panel and set permissions on the directory in question but still get this error. Any thoughts?





Quote:
Originally Posted by Doug G
If it helps here's the reference for the CopyFile method

http://msdn.microsoft.com/en-us/lib...v=vs.84%29.aspx

Also turn off show friendly http errors in your browser and see if you then get the actual error message. And check that your web server has write permission to the target directory.

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming Languages - MoreASP Programming > CopyFile not working...


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.

© 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap