Page 2 of 2 <12
Topic Options
#35075 - 2003-01-21 04:39 PM Re: XCopy and Excluding Files
Trish Offline
Fresh Scripter

Registered: 2002-07-09
Posts: 23
You rock star! My hero! Thanks a Million!
Top
#35076 - 2003-01-21 04:46 PM Re: XCopy and Excluding Files
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
UpdateFile() does this, too, however, it also checks version numbers for files that might contain versioning info.
_________________________
There are two types of vessels, submarines and targets.

Top
#35077 - 2003-01-21 04:51 PM Re: XCopy and Excluding Files
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Waltz is my hero too - just gave Waltz a five-star rating blast - might want to do same, check the Rate Member link under name.

-Shawn

Top
#35078 - 2003-01-21 05:17 PM Re: XCopy and Excluding Files
Trish Offline
Fresh Scripter

Registered: 2002-07-09
Posts: 23
FYI Just a slight edit. It's perfection!
code:
$Source = "K:\Production\Truck"
$Target = "C:\Truck"
If Exist($Target) = 0 ;I love this!
MD $Target
EndIf
$FileName = Dir($Source)
While $FileName <> "" AND @ERROR = 0
$compare = CompareFileTimes($Source+"\"+$FileName,$Target+"\"+$FileName)
If $compare = 1 OR $compare = -3 AND Right($Filename,3) <> "txt" AND Right($Filename,3) <> "pbl" ;needed and's
Copy $Source+"\"+$FileName $Target
EndIf

$FileName = Dir()
? " Updating $FileName"
Loop

Thank you! Thank you! I couldn't figure it out without you!

Top
#35079 - 2003-01-21 06:39 PM Re: XCopy and Excluding Files
Waltz Offline
Seasoned Scripter

Registered: 2002-08-01
Posts: 485
Loc: Waterloo, Ontario, Canada
Glad to have been of some use...Thanks for the kind words...
Perfection is in the eye of the beholder... [Wink]
Don't be so hard on yourself...You could have figured it out...Sometimes we can't see the forest for the trees...
Cheers...
P.S. Can I get a job there? [Smile]

[ 21. January 2003, 19:18: Message edited by: Waltz ]
_________________________
We all live in a Yellow Subroutine...

Top
Page 2 of 2 <12


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

Who's Online
0 registered and 476 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.056 seconds in which 0.027 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