Last active
October 17, 2019 14:21
-
-
Save adamfortuno/da2f4cfe1a98495105a23a7afb1767ac to your computer and use it in GitHub Desktop.
DOS script to Add the `dntz` File Extension to Any Files Without a File Extension
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
REM Will add the `dntz` file extension to files w/o a file extension | |
REM in the current directory | |
for %f IN ("*.") DO ren %f %f.dntz | |
REM Will add the `dntz` file extension to files w/o a file extension | |
REM in the current and any sub-directories | |
for /R %f IN ("*.") DO move %f %f.dntz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The first parameter for
rename
can be a relative or absolute file path. The second parameter has to be a filename and only the filename. If you need to recurse through a directory tree renaming as you go, usemove
instead ofrename
.