Page 1 of 1 1
Topic Options
#416 - 1999-09-08 11:12 AM xcopy and logfile
Anonymous
Unregistered


Sorry I made a mistake! Please don't care about my first question. This is the real error code I get!

C:\winntls\kix32 test.kix
Invalid number of parameters

My test script looks like:

$LogFile = "c:\test\Test.log
shell "xcopy c:\winnt\*.* c:\wintmp\ /s /v /e >$LogFile 2>&1"
exit

I also tried without the parameters 2>&1 because there is already a question concerning this problem.

I general, I have the same problem when I'm using DOS NET USE or kix USE. I just want to send this outputs to a logfile. Is there someone how can help me?

Thank you for your answer.
Manuel

Top
#417 - 1999-09-08 01:17 PM Re: xcopy and logfile
Shawn Administrator Offline
Administrator
*****

Registered: 1999-08-13
Posts: 8611
Try this...

shell "%comspec% /c xcopy c:\winnt\*.* c:\wintmp\ /s /v /e >$LogFile 2>&1"

Shawn.

Top
#418 - 1999-09-08 01:20 PM Re: xcopy and logfile
Anonymous
Unregistered


Hi Manuel,

First, I just want to make sure you made a typing mistake when you posted your message rather than it exists in your script. That is, when you declare $LogFile, you do not have a closing ". Make sure this is correct in your script.

I ran a quick test as follows:

shell "c:\winnt\system32\cmd.exe /c dir /b /a-d > c:\temp\dir.txt"
open (1,"c:\temp\dir.txt",2)
$x=readline(1)
? $x
while @error=0
$x = readline(1)
? $x
loop
close (1)

and it works fine. Try taking the "2>&1" out. If that doesn't work, try running the xcopy in a command window. Make sure you are specifying the correct parameters. For instance, you don't need to specify "/s /e." "/e" includes "/s." Also, if you want to maintain attributes, you need to include "/k." If you want to copy hidden and system files, include "/h." If c:\wintmp is a directory, you might want to include "/i."

Hope this helps some.

Regards,

Brad

Top
#419 - 1999-09-14 09:51 AM Re: xcopy and logfile
Anonymous
Unregistered


Hello Brad
Thank you very much for your help. Your way is working excellent. Also many thank for your help concerning xcopy paramters!!

Manuel Laesser

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 1343 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.048 seconds in which 0.022 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