I\'m writing a batch script and I need the unix time. It\'s easy under linux, but I can\'t figure out how to do this in windows.
If by "unix time" you mean the epoch second, then Windows doesn't include tools to produce that. Instead, you can install third-party tools. For example:
date binary (under C:\Cygwin\ or wherever you installed it)Alternately, per the awesome comment on this answer, you could install GNU Coreutils which also include a date command. It includes a number of other tools that you may not need, but then, so does Cygwin.