Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

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 ASP Free Forums Sponsor:
  #1  
Old September 1st, 2006, 08:12 AM
chapman10s's Avatar
chapman10s chapman10s is offline
**Wanted Wizard**
ASP Free God (5000 - 5499 posts)
 
Join Date: Apr 2006
Location: Who knows...
Posts: 5,410 chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)chapman10s User rank is General 5th Grade (Above 100000 Reputation Level)  Folding Points: 12139 Folding Title: Novice Folder
Time spent in forums: 3 Weeks 4 Days 12 h 36 m
Reputation Power: 1331
Send a message via AIM to chapman10s Send a message via MSN to chapman10s
ActiveX Script (VB) for DTS packages

I am not sure what forum this needs to be in: Here or SQL Development, elsewhere?

I am trying to write a DTS package using ActiveX Script. Inside the script, I want to pick up all text files and move them to another directory. The original files are on my webserver and get written there from a FSO from an online application where an enduser submits information.

Currently, my code doesn't like the path: Is there something wrong with code and approach?

Code:
'*************************************************  *********************
'  Visual Basic ActiveX Script
'*************************************************  ***********************

Function Main()

Dim oFSO, oFolder
Dim sSourceFile
Dim sDestinationFile

Set oFSO = CreateObject("Scripting.FileSystemObject")
Set oFolder = oFSO.GetFolder("\\servername\inetpub\wwwroot\www.sheffieldfinancia  l.com\") 

for each x in oFolder.Files

	sSourceFile = "\\servername\inetpub\wwwroot\www.sitename.com\" & x.Name   
	sDestinationFile = "F:\NEWSCORE\SPOOL\RequestAutoCredit\" & x.Name

	oFSO.MoveFile sSourceFile, sDestinationFile

next

' Clean Up
Set oFSO = Nothing
	
Main = DTSTaskExecResult_Success
End Function


****servername comes from my webserver****sitename is the website****Do I need it mapped differently or am I passing the right commands?

Reply With Quote
  #2  
Old September 1st, 2006, 06:46 PM
Doug G Doug G is offline
Grumpier Old Moderator
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Sep 2003
Posts: 10,143 Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level)Doug G User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 4 Days 23 h 57 m 26 sec
Reputation Power: 181
One likely culprit is permission settings where your code doesn't have permissions to the remote server folder.
__________________
======
Doug G
======
I didn't attend the funeral, but I sent a nice letter saying I approved of it. --Mark Twain

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > ActiveX Script (VB) for DTS packages


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



 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

 

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





© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT