Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


copy error, need help!

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,59871
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> copy error, need help!
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 copy error, need help! - 5/6/2008 4:15:10 AM   
  logijt

 

Posts: 2
Score: 0
Joined: 5/6/2008
Status: offline
Hi Everyone,
I'm writing a script that needs to do some version checking, copy software from my server, then run the software. I've included my code below. I get to where the file copies run, but the files are not copied. The destination directory exists and is empty. The error code returned by each copy method is code 10 (The object specified already exists). I've tried copying the files via folder copy, but that also returned a code 10. Anyone have any ideas?

-Jack


      
 
 
Post #: 1
 
 RE: copy error, need help! - 5/6/2008 5:19:05 AM   
  _o0o_

 

Posts: 6
Score: 0
Joined: 5/6/2008
Status: offline
I never used CIM_DataFile before .. but
did you try FileSystemObject instead CIM_DataFile query ?
It's work fine for me ..

_o0o_

(in reply to logijt)
 
 
Post #: 2
 
 RE: copy error, need help! - 5/6/2008 7:31:44 AM   
  logijt

 

Posts: 2
Score: 0
Joined: 5/6/2008
Status: offline
FileSystemObject doesn't work with WMI, so I have to do the copy without it.  I'm using WMI, since these operations need to occur across the network.

quote:

ORIGINAL: _o0o_

I never used CIM_DataFile before .. but
did you try FileSystemObject instead CIM_DataFile query ?
It's work fine for me ..

_o0o_

(in reply to _o0o_)
 
 
Post #: 3
 
 RE: copy error, need help! - 5/9/2008 3:40:20 AM   
  _o0o_

 

Posts: 6
Score: 0
Joined: 5/6/2008
Status: offline
I supposed that you have NETBIOS working on , and you can use  \\server\... directions , any case
you could do it by using the create method from Win32_Process Class and executing on local any shell comand like xcopy or similar ,
but i let anyone help you about CIM_Datafile class , sorry i don't used never before.

_o0o_

(in reply to logijt)
 
 
Post #: 4
 
 RE: copy error, need help! - 5/9/2008 5:25:11 PM   
  DiGiTAL.SkReAM


Posts: 1056
Score: 6
Joined: 9/6/2005
From: Florida, USA
Status: offline
Yucko.
Using WMI for file management is, to me, akin to pounding oneself in the groin with a sledgehammer for an hour... very painful, and any gains that you make are FAR outweighed by the effort you exert.
I much prefer the FileSystemObject, and can't understand why everyone keeps saying that it doesn't work across a network.
FSO works beautifully across a network, you just have to give it the proper path...
Say you have the path to a file: v:\temp stuff\my funky little file.txt
or even \\servername\sharename\temp stuff\my funky little file.txt
set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.GetFile("v:\temp stuff\my funky little file.txt").Copy "c:\my new location for files\"

set oFSO = CreateObject("Scripting.FileSystemObject")
oFSO.GetFile("\\servername\sharename\temp stuff\my funky little file.txt").Copy "c:\my new location for files\"


_____________________________

"There's the one man who learns by reading, the two men that learn by watching, and the rest of us have to pee on the electric fence for ourselves." - Roy Rogers

"Would you like to touch my monkey?" - Dieter (Mike Meyers)

(in reply to _o0o_)
 
 
Post #: 5
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> copy error, need help! Page: [1]
Jump to:





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