1.

Solve : typing "a" automatically?

Answer»

need help !!

i have made copy.bat
the script is

@echo off

xcopy c:\test \\192.168.1.200\backup /s/e/v/d

end the problem is, whet it running by click the file, it need to type y or a, because some file is need to replaced. i want to make it automatically. how to make the script, after the script that i wrote..

thanks...

You could try using the pipe:

echo a | xcopy c:\test \\192.168.1.200\backup /s/e/v/d

If possible use the "a" option. You can only use the pipe once PER command.

Good luck. thanks alot for your help..
it works..

i need help for one question anymore

how to make it execute automatically without click the batch file?
and what script i have to add to make this file execute every 100 minnute?

thanks alots

You can use the task scheduler to have the job run once per day, then use the advanced settings to run every 100 minutes within a single day.

You could also improvise by making your batch file recursive and using the ping command with the -w switch.

There is a sleep command distributed with the Windows Resource Kit (big download). Search for it at Resource Kit

Good luck. thanks alots, i have used task scheduler to do that..
and now i have the list folder that i have to copies, the files:
- Akademika
- Arif
- Datasql
- Marketing
- etc

when i run the batch file, it run to copy Akademika first and continue to Arif folder, and when it going to copy Datasql, the batch file stop to copy. because Datasql cannot be copied.
Datasql is used by sqlserver service. So it can't be copied. But I have to copy this folder.
do you have any idea to solve my trouble, beside use batch file?
can you help me how solve this problem.., SORY i hate to distrub u again.
thanks a lots
You can add the /c switch to your XCOPY command. Datasql will not be copied but the switch will prevent your batch file from crapping out.

Another process probably has Datasql locked, you will not be able to copy it until the other process gives up control.

Hope this helps. it works perfect..
thanks a lots dude..

i will SET task schuder time for switchoff the sqlserver, when task scheduler time backup starts..


he.. i'am coming again..

the trouble now, the file is have coppied about 37 Gbyte, and then the xcopy proses is stop, the ALERT message SHOW "insufficient memory"...
what do you think with this problem, backup with xcopy need a big memory to use, is it true?
Check to make sure that none of your files resolve to file names longer than 254 characters. A workaround would be to use ROBOCOPY which is included in the Windows Resource Kit.

If a long file name is causing XCOPY to choke, you can use the /N switch which uses the file short names, but short file names may not be suitable for your situation.

Good luck.

PS. When posting, please include your OS.



Discussion

No Comment Found