Re: Copy all but one file.
- From: Omar Abid <omar.abid2006@xxxxxxxxx>
- Date: Wed, 13 Jun 2007 15:17:21 -0700
On 13 juin, 12:26, "Jeremy" <jer...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
Why not use a batch file instead? You can still prompt for the
computernames by using SET /P. Then if you did a copy with robocopy you
could use the /XF switch to exclude specific file names. Something like
this:
---
@ECHO OFF
SET /P OLDNAME=Enter the name of the old computer:
robocopy "\\%OLDNAME%\c$\Documents and settings\%username%" "C:\documents
and settings\%username%" /e /xf desktop.ini
---
"TimM" <T...@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:7B44DA46-758A-4566-9083-652B7CE2B436@xxxxxxxxxxxxxxxx
I am trying to copy all the files form the desktop from one computer to
another. The old computer is put in by an input box then inserted into the
script. Is it possible to copy all the files in the Desktop folder except
for
the desktop.ini? Or mayby I'll be lucky and some one will have a script
that
copies a user profile from one PC to another, without relying on the
windows
file transfer utility.
My script:
Set objNetwork = CreateObject("Wscript.Network")
strUserName = objNetwork.UserName
Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.CopyFile "\\" & strOldName & "\c$\Documents And Settings\"& _
strUserName & "\Desktop\*.*" , "C:\Documents And Settings\" &
strUserName & "\Desktop"
--------
Thanks
TimM- Masquer le texte des messages précédents -
- Afficher le texte des messages précédents -
Batch file will show a console and this is not a good solution because
user may close it .
.
- References:
- Re: Copy all but one file.
- From: Jeremy
- Re: Copy all but one file.
- Prev by Date: Locale and CDate issue
- Next by Date: Using the DiskQuota object returns many names unresolved in Windows 2000 - any way to get all?
- Previous by thread: Re: Copy all but one file.
- Next by thread: Re: octet string - Echo or Dump Contents
- Index(es):
Relevant Pages
|