Copy Files

From Wiki

Revision as of 00:58, 23 June 2008 by SYNACK (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to:navigation, search

Script Language: .bat

Just simply edit the code below to suite what you need it for. If you want to copy more than one folder just add more lines.

<vb> copy "C:\Documents and Settings\All Users\Start Menu\Programs\Microsoft Office\Office Outlook 2007.lnk" "C:\Documents and Settings\All Users\Desktop" </vb>

Script Language: .VBS

Simple Example of copying a file from one place to another, works with unc paths.

<vb> Set FSO =CreateObject("scripting.FileSystemObject") FSO.CopyFile "\\server\share$\test1.txt", "c:\" ,True MsgBox" File Copy Successfull", vbInformation, "" </vb>

Script Language: .VBS

Like above but for copying folders

<vb> Set FSO =CreateObject("scripting.FileSystemObject") FSO.CopyFolder "\\server\share$\foldername", "c:\copyfolder" ,True MsgBox"Folder Copy Successfull", vbInformation, "" </vb>