Page 1 of 1 1
Topic Options
#57327 - 2001-07-17 04:29 PM COPY
Anonymous
Unregistered


Hi all,
I need to do a simple thing but I can't. I need to copy a directory which contains sub-directories. How I can copy this directory with their sub-directory to other folder??
Which command I must use to do this?? Thanks

Top
#57328 - 2001-07-17 04:31 PM Re: COPY
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Did you try to use XCOPY ?

HTH,

- Kent

[ 17 July 2001: Message edited by: kdyer ]

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#57329 - 2001-07-17 05:41 PM Re: COPY
Anonymous
Unregistered


Thanks but I try to use it and it doesn't work. The version of KIX have importance in this commnad? Do you have another command or suggestion??
Top
#57330 - 2001-07-17 05:44 PM Re: COPY
Jochen Administrator Offline
KiX Supporter
*****

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

please not that if you want to use xcopy inside a kix script you have to shell it out :

code:

shell '%ComSpec% /C xcopy Source Destination /options'

Jochen

[ 17 July 2001: Message edited by: jpols ]

_________________________



Top
#57331 - 2001-07-17 05:46 PM Re: COPY
Kdyer Offline
KiX Supporter
*****

Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
Check the switches for XCOPY using XCOPY /? ..

If you want to use this in a KIX Script, you may want to use the following -

SHELL "%COMSPEC% /C XCOPY C:\FOLDER H:\NEWFOLDER /E"

HTH,

- Kent

_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#57332 - 2001-07-17 05:51 PM Re: COPY
Anonymous
Unregistered


Thanks again. Could you tell me what is the meaning of "%COMSPEC% /C".
Top
#57333 - 2001-07-17 05:53 PM Re: COPY
Jochen Administrator Offline
KiX Supporter
*****

Registered: 2000-03-17
Posts: 6380
Loc: Stuttgart, Germany
%ComSpec% = Systems Environment Variable for path\cmd.exe (NT/W2K) or path\command.com (9x)
/C = Close after execute

hth

Jochen

_________________________



Top
#57334 - 2001-07-17 05:56 PM Re: COPY
Anonymous
Unregistered


Thanks to all one more time.
Top
#57335 - 2001-07-26 08:39 PM Re: COPY
Anonymous
Unregistered


Here is an example of what I did:

This copys their favorites folder back to their homeshare on the server.

code:

;Intialize profile variable
$profile="%userprofile%"

SHELL '%comspec% /c MD "H:\@userid\Favorites"'
SHELL '%comspec% /c xcopy /d /s /e /v "$profile\Favorites\*.*" "H:\@userid\Favorites\"'



Top
Page 1 of 1 1


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

Who's Online
1 registered (Allen) and 641 anonymous users online.
Newest Members
batdk82, StuTheCoder, M_Moore, BeeEm, min_seow
17885 Registered Users

Generated in 0.054 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