Change batch script to shell script
Help! How can i change this batch script to shell script?
cd WORLD ren 2*.html "2004%1wor??.*" cd .. cd TOP_ST~1 ren 2*.html "2004%1top??.*" cd .. cd SPORTS ren 2*.html "2004%1spo??.*" cd .. cd PROV ren 2*.html "2004%1pro??.*" cd .. cd OPINION ren 2*.html "2004%1opi??.*" cd .. cd METRO ren 2*.html "2004%1met??.*" cd .. cd LIFE ren 2*.html "2004%1lif??.*" cd .. cd ENTER ren 2*.html "2004%1ent??.*" cd .. cd BUSINESS ren 2*.html "2004%1bus??.*" cd .. |
should just need to change ren to mv.
|
And replace %1 with $1
|
Well i did that but an error occured when i run the script mv --help always pop up.
|
Are you sure this batch work fine in dos ?
And could you post the output with ls WORLD/2*.html Also how do you invoke your batch (with an argument or not) |
Yup batch script work well on win nt and win 98. this is how the batch file works, first we place the .bat file in the directory where the .html files are then we execute the .bat file by clicking it then a popup window will appear what prefix we want to rename it to.
Can you help me? This will help me to lessen my time in renaming my files. |
All times are GMT -5. The time now is 05:58 AM. |