Sunday 5 June 2011

How do you change extensions in MS-DOS?

Working on a lab now and need a little assistence.





Heres the question:


The diskette has three COBAL files (.cbl and .cbf). Copy them into your new directory, changing the extension to .c for both files as you copy.





I know how to copy the files into the new directory but not sure how to change the extensions.


Thx for your help.|||to create directory lets say our new directory is %26quot;new%26quot;


c:\%26gt; md new


c:\%26gt; copy *.cb* c:\new


c:\%26gt; ren *.cb* *.c





Done.|||Use wildcards as follows:





COPY *.cbl NEWDIR\*.c





Extensions will be changed in the new directory.





hope this helps.|||It%26#039;s been a long time since I%26#039;ve used DOS but when you copy the files you should be able to supply a new name. So when you type the new name just type the same name but with .c at the end.