Skip to content

Instantly share code, notes, and snippets.

@wuzzzzaah
Last active August 29, 2015 14:17
Show Gist options
  • Save wuzzzzaah/831f73eed5808b5f040f to your computer and use it in GitHub Desktop.
Save wuzzzzaah/831f73eed5808b5f040f to your computer and use it in GitHub Desktop.
Appends timestamp to file
set dt=%date:~7,2%%date:~4,2%%date:~10,4%%time:~0,2%%time:~3,2%%time:~6,2%
set origFile=%1
set noext=%origFile:~0,-4%
set ext=%origFile:~-4%
ren %1 %noext%%dt%%ext%
@wuzzzzaah
Copy link
Author

append_timestamp_to_file.bat sample.csv

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment