sagiegurari / shell2batch

Coverts simple basic shell scripts to windows batch scripts.
Apache License 2.0
57 stars 7 forks source link

Touch support #9

Closed roblabla closed 5 years ago

roblabla commented 5 years ago

Features Description It'd be nice if a simple touch file would work, creating an empty file, and ideally updating the last access time.

Describe the solution you'd like

Here's some arcane commands I found while researching this:

echo n | copy /-y NUL filename.ext is an ugly but obvious one-liner to create an empty file if it does not exist.

copy /b filename.ext +,, will update the timestamp of a file. The +,, flag is documented on the copy command doc.

sagiegurari commented 5 years ago

all for it. you want to submit a PR?

roblabla commented 5 years ago

Will do, I'll send one in a day or two, currently don't have access to a windows machine.

sagiegurari commented 5 years ago

@roblabla this is now implemented in a dev branch

roblabla commented 5 years ago

TYVM! Been a bit busy and haven't had much time to dedicate to this :<.

I'll build cargo-make with this and test it this we.

sagiegurari commented 5 years ago

published