Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

stabben23
Honored Contributor

Re: Batch error ?

Hi Helen,

if E is a network disc use the Whole searchway like \\fileshare\QV\Sales\Daily_Sales.txt

Highlighted
sasikanth_narne
Valued Contributor III

Re: Batch error ?

HI,

Try this


@ ECHO OFF

SET IP_Path=D:\QV

SET OP_Path=E:\QV\Sales


SET date=%date:~10,4%-%date:~7,2%-%date:~4,2%

SET hr=%time:~0,2%.%time:~3,2%.%time:~6%

copy /v "%IP_Path%\Customer.qvd"  "%OP_Path%\Customer_%date%_%hr%.qvd"


Hope it helps you..

Re: Batch error ?

Could it be that your statement is missing a specified filename like:

Xcopy "D:\QV\Customer.qvd" "E:\QV\Sales\Customer.qvd" /s /i /y

Xcopy "D:\QV\Hier.qvd" "E:\QV\Sales\Hier.qvd" /s /i /y

- Marcus

Not applicable

Re: Batch error ?

Thanks Sasi

Its working..but i need to create the log as well,

how many files are copied, on date & time

Regards,

Helen

sasikanth_narne
Valued Contributor III

Re: Batch error ?

hi,

You can check windows log files for this , please refer the below link

Create list/TEXT file of copied files after copying Batch Command - Stack Overflow

Log For xcopy batch file

Thanks,

Re: Batch error ?

I wouldn't use xcopy if I had to manage larger amounts of copying/moving/deleting tasks or to ensure a stable logging of them. I would use vbs-macros or Robocopy - Wikipedia, the free encyclopedia.

- Marcus

Not applicable

Re: Batch error ?

When i am using the above script am getting msg like this  ?

Does D:\QV specify a file name

or directory name on the target

(F = file, D = directory)?

how to resolve this ?

Regards,

Helen

MVP
MVP

Re: Batch error ?

This is a Windows batch message, not a QV message. I believe the earlier postings explain why - XCopy expects a file name or file mask and sees the path you supply as ambiguous. If you check out the xcopy help, you should be able to suppress this message. But I agree with Marcus about using Robocopy or script instead of xcopy.