Page 1 of 1 1
Topic Options
#18867 - 2002-03-20 05:24 PM copying files
Keerat Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 15
Loc: London
hello again people

u guys probably think im really dumb.. but i need ur help again.

Im trying to write a script, which, on logon, checks for bvlogo.bmp under c:\winnt, and if it is not present, then it copies it from the server.

If the file is present, it does not do the copy...

BUT. I obviously cannot get it to work

I was able to get it to copy the file over everytime, but this takes up network resources each time...

heres the script which I pulled together to check n copy if needed...

**************************************************

IF exists("c:\winnt\bvlogo.bmp")

goto END

[
ELSE
COPY "\\bvlon03\e$$\data\home\bvlogo.bmp" "c:\winnt\bvlogo.bmp"
]

ENDIF

return

**************************************************

Any ideas chappies?

Top
#18868 - 2002-03-20 05:32 PM Re: copying files
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11164
Loc: Boston, MA, USA
The correct code would be
code:
IF NOT EXIST('c:\winnt\bvlogo.bmp')
COPY '\\bvlon03\e$$\data\home\bvlogo.bmp' 'c:\winnt\bvlogo.bmp'
ENDIF

Make sure that the user has read access to '\\bvlon03\e$$\data\home\bvlogo.bmp' and write access to 'c:\winnt\bvlogo.bmp'
_________________________
There are two types of vessels, submarines and targets.

Top
#18869 - 2002-03-20 05:43 PM Re: copying files
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Don't forget, NOT is new to KiX 4.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#18870 - 2002-03-20 05:50 PM Re: copying files
Keerat Offline
Fresh Scripter

Registered: 2002-03-18
Posts: 15
Loc: London
NICE!!!!!!!!!!!

[Cool] [Cool] [Cool] [Cool] [Cool] [Cool]

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 128 anonymous users online.
Newest Members
SERoyalty, mytar, Gabriel, Alex_Evos, Dansen
17869 Registered Users

Generated in 0.317 seconds in which 0.289 seconds were spent on a total of 13 queries. Zlib compression enabled.

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