myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


plain copying files

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

Logged in as: Guest
  Printable Version
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> plain copying files Page: [1]
Login
Message << Older Topic   Newer Topic >>
plain copying files - 9/1/2008 9:05:11 PM   
snorris792

 

Posts: 10
Score: 0
Joined: 8/26/2008
Status: offline
Hi sorry to bother you all again with something I am sure is quiet simple, I have done some searching but have not found what im looking for.

Alot of applications I work with are in house developed and once installed just require to have files updated, usually the exe but occationally dll's and xml files.

What is the best way through sccm to just do a plain file copy to the machines?

Thank you
Post #: 1
RE: plain copying files - 9/2/2008 2:54:07 AM   
amartensson

 

Posts: 104
Score: 0
Joined: 7/25/2006
Status: offline
This is a script I use on my sccm. Create a package with the script, run it with "cscript.exe script.vbs" and it should work. I didn't write the script myself, borrowed it from somewhere on the net:)

Set oShell = CreateObject("WScript.Shell")
strCommand = oShell.Run("Xcopy ""Path:\your files"" ""Path:\Your destination"" /S /Y", 0, True)
If strCommand <> 0 Then
MsgBox "File Copy Error: " & strCommand
Else
MsgBox "Done"
End If

(in reply to snorris792)
Post #: 2
RE: plain copying files - 9/2/2008 5:09:37 PM   
mhudson

 

Posts: 541
Score: 12
Joined: 4/1/2007
From: College Station, TX
Status: offline
We run all the copy commands via a CMD or BATCH file.  You just need to be aware if you copying it via the DP or from the client local cache to the destination folder since this changes the way some things work.

_____________________________

Matthew Hudson
http://sms-hints-tricks.blogspot.com/
http://www.sccm-tools.com

(in reply to amartensson)
Post #: 3
RE: plain copying files - 9/3/2008 9:54:48 PM   
snorris792

 

Posts: 10
Score: 0
Joined: 8/26/2008
Status: offline
Yeah thats what I thought I was hoping i didnt have to use scripts, The range of things sccm does and there is no simple file copy built in.

Any advise on having a variable in the script for the DP, If i run the batch script or vb script on the machine to copy files i would like to pull them from the local DP and not a central point, is there anything on hand I could use or is it something im going to have to go out of my way to make happen?

Thanks heaps for all the help guys

(in reply to mhudson)
Post #: 4
RE: plain copying files - 9/4/2008 8:45:35 AM   
mhudson

 

Posts: 541
Score: 12
Joined: 4/1/2007
From: College Station, TX
Status: offline
You can push the files down to the local cache and run the copy.  Since the batch file doesn't like UNC paths very much I typically do this
-----------
Map \\server\path\pathc drive to X: (any drive you know will be open)
copy x: to c:\xxxx   (or xcopy depending on what I am doing)
-----------

Now no matter where it runs it will get the actual file from a specfic server.  There are many ways to do this and everyone has their own way.  So mainly you just need to test what works best for your enviroment.

_____________________________

Matthew Hudson
http://sms-hints-tricks.blogspot.com/
http://www.sccm-tools.com

(in reply to snorris792)
Post #: 5
RE: plain copying files - 9/4/2008 9:02:33 AM   
eschloss


Posts: 616
Score: 25
Joined: 9/7/2004
From: Cincinnati
Status: offline
Batch files handle UNC paths just fine if you use the right commands.
try this command in your batch file:
copy "%~dp0*.*" C:\Folder1\Folder2

it will copy all files in the folder where the bat file resides to C:\Folder1\Folder2.  one thing to remember about the %~dp0 variable is that it contains the trailing slash '\'.
If you batch file is on \\server1\smspkgd$\sms000001, then the value of $~dp0 will be \\server1\smspkgd$\sms000001\.

(in reply to mhudson)
Post #: 6
RE: plain copying files - 9/4/2008 11:55:17 AM   
jnelson993


Posts: 900
Score: 127
Joined: 2/18/2005
From: Minneapolis, MN
Status: offline
Righto.  I've recently written something up on this too, just an FYI

http://myitforum.com/cs2/blogs/jnelson/archive/2008/08/15/121348.aspx


_____________________________

Number2 (John Nelson)
MyITForum - Blog
MyITForum - Forum Posts

(in reply to eschloss)
Post #: 7
Page:   [1]
All Forums >> [Management Products] >> System Center Products >> System Center Configuration Manager >> plain copying files 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



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.293