1.

Solve : File verification batch?

Answer»

I want to create a batch job that goes in a login script that will check for a file with a certain date and time stamp and if it does not exist, copy the CORRECT file to the PC. I know that I would need a IF/THEN type statement but I don't know how to specify the date/time stamp on the file. Any help would be great. Thanks.
DOS batch does not support IF/THEN statements. I am constantly AMAZED at the magical qualities that people seem to give to batch language.

If you have a Windows OS, a far BETTER choice would be Windows Script. Why? It's readable, more objects are exposed and you don't have to rely on obscure switches and non-intuitive commands to accomplish a simple task. If you THINK the DO command is intuitive to parse a date or CHOICE makes any sense for a time delay, by all means use DOS batch.

With Windows Script, you have access to methods and properties unheard of with DOS batch. A login script can be rather complicated, sometimes it's better to use the RIGHT tool for the job.

If you post your script here, or have any questions, there are many people that can help you.

Regards,



Discussion

No Comment Found