Page 1 of 1 1
Topic Options
#124669 - 2004-08-09 04:17 PM Copy file to user's local hard drive
KathyTX Offline
Fresh Scripter

Registered: 2004-03-26
Posts: 7
Loc: Texas
We use Win2k servers and workstations. We use Symantec AntiVirus software. I have changed the primary server and need to copy a file to each user's local hard drive so it will let them know to use the new primary server for virus updates. I tried the code below and it does not work. Can anyone tell me what is wrong with it?

copy /d %0\..\grc.dat "C:\Documents and Settings\All Users\Application Data\Symantec\Norton Antivirus Corporate Edition\7.5"

The grc.dat file is in the \\pdc\netlogon\ folder along with the kix script.



Top
#124670 - 2004-08-09 04:21 PM Re: Copy file to user's local hard drive
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
try

@scriptdir + '\grc.dat'

instead of

%0\..\grc.dat

does this change anything ?
_________________________



Top
#124671 - 2004-08-09 04:42 PM Re: Copy file to user's local hard drive
KathyTX Offline
Fresh Scripter

Registered: 2004-03-26
Posts: 7
Loc: Texas
Tried that. Still does not copy the file. If I run a .bat file from a command line with

copy /d %0\..\grc.dat "C:\Documents and Settings\All Users\Application Data\Symantec\Norton Antivirus Corporate Edition\7.5"

it works. I am doing something wrong.

Top
#124672 - 2004-08-09 04:51 PM Re: Copy file to user's local hard drive
KathyTX Offline
Fresh Scripter

Registered: 2004-03-26
Posts: 7
Loc: Texas
I can run the bat file from the script using
RUN 'grc.bat'

THANKS!

Top
#124673 - 2004-08-09 04:53 PM Re: Copy file to user's local hard drive
maciep Offline
Korg Regular
*****

Registered: 2002-06-14
Posts: 947
Loc: Pittsburgh
looks like you're mixing dos copy with kix copy. here's the usage for kix's copy command. Use "shell" if you'd rather use dos copy

Code:

Copy

Action: Copies one or more files or directories.

Syntax: COPY "source" "target" [/c] [/h] [/r] [/s]
/c Continue copying, even if error(s) occur.
/h Copies hidden and system files also.

/r Overwrite read-only files on target.
/s Copies files and subdirectories (including empty subdirectories).

Remarks: If the source or target specifies a directory, please make sure to add a trailing backslash.

Wildcards are supported.

If a file already exists at the target, it is overwritten without warning.

If the /c argument is not specified, and an error is encountered, the copy process will be aborted.


See Also: CD, Del, Go, MD, Move, RD

Examples: ; The following examples copy all files in MyDir to NewDir
COPY "S:\MyDir\*.*" "S:\NewDir\*.*"
COPY "S:\MyDir\." "S:\NewDir\."
COPY "S:\MyDir\" "S:\NewDir\"
; If the target (directory) does not exist,
; and the target specification does not have a
; trailing backslash, COPY will fail with an
; errorcode 3 ("path not found")
COPY "S:\MyDir\" "S:\NewDir" ; fails if NewDir does not exist

; This command will copy all files that match
; the wildcard specification and change their
; extension to '.bak'
COPY "MyDir\file*.txt" "MyDir\file*.bak"

_________________________
Eric

Top
#124674 - 2004-08-09 05:30 PM Re: Copy file to user's local hard drive
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Symantec provides the GRCdrop utility that will take care of location differences between clients.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

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
1 registered (Henriques) and 2516 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.09 seconds in which 0.064 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