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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integration Manager Script to rename source file?

Status
Not open for further replies.

barbola

Technical User
Feb 27, 2003
1,132
CA
I've never used scripts and thought this looked like it should do the trick, but nothing happens, and I get zero records, yet both files have data. I followed the Help for After Query to rename a file after the integration, but I want to rename it before the integration. Is this right? I tried both Before Query or Before Integration but still zero records.

Code:
'copy C:\Data Export\B to C:Data Export\Ticket.csv'

sOldFile = "C:\Data Export\B"
sSourceFile = "C:\Data Export\Ticket.csv"

'Create a File System Object
   Dim pFSO
   Set pFSO = CreateObject("Scripting.FileSystemObject")
	
'Copy and rename the file
'The "True" parameter indicates that if the file already 
'exists in the destination, then it will be overwritten.

   Call pFSO.CopyFile(sOldFile, sSourceFile, True)
 
Never mind. My path was wrong and should have been C:\Data Exports with an 's' duhhhhh.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top