Page 1 of 1 1
Topic Options
#507 - 1999-09-23 09:54 PM simple xcopy question
Anonymous
Unregistered


Anyone care to help with this simple job? What's the best way to finish this script:

If Exist($SearchFile) = 0

--What I want it to do is if the file in the search path is not found, then copy the file from \\xxx\xxx\file.doc to the local c:\winnt\profiles\****user???***\ dir.

Thanks for any help!!!!

Top
#508 - 1999-09-24 07:25 AM Re: simple xcopy question
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Try this...

code:

$SearchFile = "%userprofile%\desktop\file.doc"

if Exist($SearchFile) = 0
?"Copying file..."
shell "%comspec% /c xcopy c:\file.doc %userprofile%\desktop\"
else
?"File already copied !"
endif


Shawn.

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 1095 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.05 seconds in which 0.024 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org