|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Hello all, I really need some help with this stupid script Im trying to create, so here goes;
Well I'm trying to create a script to implements a dos style rename. The scripts parameters are file names follwed by a target that that specifies either a new main part of the file name or a new extension part but not both. Rename File1 File2 File3 *.html/newfile So File1 to File3 are params and *.html/newfile is the target. Then with my loop Im trying to check the validity of them eg less than 2 params, cant have 2 dots, more than one asterisk and doesnt exist. Then If there are no errors the files are to be renamed in another loop. But I'm really struggling with it and Its really beginning to get on my nerves as I dont know what Im doing wrong! Any Suggestions on how I should do it would be fantastic. Again many thanks. Z ![]() |
|
#2
|
|||
|
|||
|
need more info
I have a few ideas for your script, but I need more info on how it is supposed to work. Given the following command from your post, what would be the result?
Rename File1 File2 File3 target You make it sound like you are trying to rename all 3 files to target, but I don't see how this is possible to have 3 files named the same. |
![]() |
| Viewing: Dev Shed Forums > Operating Systems > UNIX Help > Really Need Help Dos Style Rename |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|