SunQuest
           UNIX Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsUNIX Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
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  
Old April 1st, 2004, 05:25 AM
zeta_acosta zeta_acosta is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 1 zeta_acosta User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Exclamation Really Need Help Dos Style Rename

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

Reply With Quote
  #2  
Old April 2nd, 2004, 10:30 PM
Nevets Nevets is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Posts: 11 Nevets User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
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.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsUNIX Help > Really Need Help Dos Style Rename


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway