Page 1 of 1 1
Topic Options
#22328 - 2002-05-29 05:33 PM ECHO A|
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
I am trying to do the following..

code:
Shell 'ECHO A| XCOPY /E $SRC $COMP$DSTDRV\eEntrprs'  

It works fine without the ECHO A| in there.. I am just trying to answer the overwrite request. I know this is how you do it in bat file... can anyone offer advice?

Thanks
_________________________
Austin Henderson

Top
#22329 - 2002-05-29 05:49 PM Re: ECHO A|
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
You need to slip the command interpreter in there somewhere, that's what implements piping and commandline redirection, eg:

Shell '%COMSPEC% /C ECHO A| XCOPY /E $SRC $COMP$DSTDRV\eEntrprs'

Hope this helps<

-Shawn

[ 29 May 2002, 17:49: Message edited by: Shawn ]

Top
#22330 - 2002-05-29 05:49 PM Re: ECHO A|
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Have you considered:
/Y Suppresses prompting to confirm you want to overwrite an existing destination file.

or

The switch /Y may be preset in the COPYCMD environment variable.

Also if you want to use the ECHO then try :

Shell '%comspec% /c echo A| ...'
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#22331 - 2002-05-29 05:49 PM Re: ECHO A|
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear,

XCOPY use another way of overwriting existing files. Important switches are
- /Y Overwrites existing files without prompting.
- /C Continues copying even if errors occur.
Our suggestion is:

code:
SHELL '%compsec /c XCOPY "$src" "$comp$dstdrv\eEntrprs" /E /Y /C /I /R'

Possible parameters:
code:
Copies files and directory trees.

XCOPY source [destination] [/A | /M] [/D[:date]] [/P] [/S [/E]] [/W]
[/C] [/I] [/Q] [/F] [/L] [/H] [/R] [/T] [/U]
[/K] [/N]

source Specifies the file(s) to copy.
destination Specifies the location and/or name of new files.
/A Copies files with the archive attribute set,
doesn't change the attribute.
/M Copies files with the archive attribute set,
turns off the archive attribute.
/D:date Copies files changed on or after the specified date.
If no date is given, copies only those files whose
source time is newer than the destination time.
/P Prompts you before creating each destination file.
/S Copies directories and subdirectories except empty ones.
/E Copies directories and subdirectories, including empty ones.
Same as /S /E. May be used to modify /T.
/W Prompts you to press a key before copying.
/C Continues copying even if errors occur.
/I If destination does not exist and copying more than one file,
assumes that destination must be a directory.
/Q Does not display file names while copying.
/F Displays full source and destination file names while copying.
/L Displays files that would be copied.
/H Copies hidden and system files also.
/R Overwrites read-only files.
/T Creates directory structure, but does not copy files. Does not
include empty directories or subdirectories. /T /E includes
empty directories and subdirectories.
/U Updates the files that already exist in destination.
/K Copies attributes. Normal Xcopy will reset read-only attributes.
/Y Overwrites existing files without prompting.
/-Y Prompts you before overwriting existing files.
/N Copy using the generated short names.

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#22332 - 2002-05-29 05:50 PM Re: ECHO A|
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
Darn it Shawn... [Mad] I just get some time while on furlough and everyone still beats me to the punch. I just can't seem to be fast enough.

[ 29 May 2002, 17:51: Message edited by: Howard Bullock ]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#22333 - 2002-05-29 05:51 PM Re: ECHO A|
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
whoa ! a three car pile-up, thats a record, me thinks [Wink]

Howard, your answer was better than mine anyways !

-Shawn

p.s. Checkout the timestamp on all three of our replies ! heheh

[ 29 May 2002, 17:53: Message edited by: Shawn ]

Top
#22334 - 2002-05-29 05:58 PM Re: ECHO A|
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Shawn,

I agree with you. It is already fast that two members enter a reaction a the same time.
The chance for three entries at same time wasn't something we could imagine.

More important is: you don't need to wait long for a solution.
It shows that the KiXtart site isn't sleep at all.
That is why KiXtart people loves this site.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#22335 - 2002-05-29 06:06 PM Re: ECHO A|
Howard Bullock Offline
KiX Supporter
*****

Registered: 2000-09-15
Posts: 5809
Loc: Harrisburg, PA USA
That's too strange. Maybe we should start playing a lottery... [Smile]
_________________________
Home page: http://www.kixhelp.com/hb/

Top
#22336 - 2002-05-29 06:11 PM Re: ECHO A|
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Playing a lottery is only interesting, when nobody can have influence on the results.
Which persons doesn't want to know
- who wins the game.
- which share get the biggest progress.
- what happens tomorrow.
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#22337 - 2002-05-29 06:18 PM Re: ECHO A|
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Oh, it gets weirder Howard, much weirder ...

There were 3 posts, all at the same time.

We all have the number 3 in our member number.

MCA's member number (732) divided by my member number (173), rounded, equals 4.

Your member number (3386) divided by MCA's member number (732), rounded equals 4.

It's freakin me out !!!

[Wink]

-Shawn

ROFLMAO

[ 29 May 2002, 18:23: Message edited by: Shawn ]

Top
#22338 - 2002-05-29 06:25 PM Re: ECHO A|
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
I am an idiot.. sorry to even post. I think I was stuck back in the NT 4.0 days.. I think I recall the /Y not being an option in the previous versions or something and that is why in the older scripts I just used the ECHO A|.. I know there was some valid reason..

; (

That just makes me mad.

Have good day guys.
_________________________
Austin Henderson

Top
#22339 - 2002-05-29 07:13 PM Re: ECHO A|
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Shawn, MCA, Howard:

What would the 'Six Degrees of Separation' game result in? Maybe you three are actually relatives?

Very weird, maybe it's a conspiracy [Confused]
_________________________
There are two types of vessels, submarines and targets.

Top
#22340 - 2002-05-29 07:33 PM Re: ECHO A|
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
The /Y is version and language dependent. ECHO A | overcomes that.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#22341 - 2002-05-30 08:48 PM Re: ECHO A|
Austin Offline
Seasoned Scripter

Registered: 2002-01-24
Posts: 439
Ahh... so maybe I am not an idiot. I knew there was some reason we had to do that.

Thanks for your help. I suppose I was just remembering the older version.
_________________________
Austin Henderson

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 1046 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.263 seconds in which 0.236 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