ToFroDos utility and Batch Script

Convert files format from DOS to UNIX

Prerequisite: http://www.thefreecountry.com/tofrodos/index.shtml

Batch script — Modify to match the files extensions
Files are converted recursively in path directory.


@setlocal
@rem Syntax: fromDos.bat [path]
if A%1A==AA (
set WD=%~dp1%~n1
) else (
set WD=%~1
)
pushd %WD%
set PATH=%PATH%;C:\Tools\ToFroDos
for /R %WD% %%F in (*.java *.cs *.cpp *.h *.ide *.tdp *.in?) do fromDos.exe -f -o -v %%F
popd
@endlocal

Advertisements
This entry was posted in Uncategorized. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s