Re: [OT] *nix - change names-

This WebDNA talk-list message is from

2006


It keeps the original formatting.
numero = 66185
interpreted = N
texte = Here is something off the top of my head but I may be way off on the index numbering. I think you should get the idea though. #!/usr/bin/bash for file in `ls` $index = 1 do rename $file d_$index.new $file $index += $index done -----Original Message----- From: Donovan Brooke Sent: Mon, 06 Feb 2006 13:26:49 -0600 To: "WebDNA Talk" Subject: [OT] *nix - change names- Hello, since the list is a bit slow, I thought I'd post a challenge for you all. I need a lil unix/linux script to run on all files in a directory to change the filenames to a consecutive number with a new suffix.. for example, changing: 123.blah 253.blah to: d_1.new d_2.new etc. Any takers? Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Custom Paint, Labels, and Specialty Signage. -> <- Home and Business Embellishment/Fabrication, -> <- Glass Blowing, and Art Glass -> PH/FAX:> 1 (608) 835-2476 Web:> http://www.egg.bz | http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: [OT] *nix - change names- ( devaulw@onebox.com 2006)
  2. [OT] *nix - change names- ( Donovan Brooke 2006)
Here is something off the top of my head but I may be way off on the index numbering. I think you should get the idea though. #!/usr/bin/bash for file in `ls` $index = 1 do rename $file d_$index.new $file $index += $index done -----Original Message----- From: Donovan Brooke Sent: Mon, 06 Feb 2006 13:26:49 -0600 To: "WebDNA Talk" Subject: [OT] *nix - change names- Hello, since the list is a bit slow, I thought I'd post a challenge for you all. I need a lil unix/linux script to run on all files in a directory to change the filenames to a consecutive number with a new suffix.. for example, changing: 123.blah 253.blah to: d_1.new d_2.new etc. Any takers? Donovan -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Custom Paint, Labels, and Specialty Signage. -> <- Home and Business Embellishment/Fabrication, -> <- Glass Blowing, and Art Glass -> PH/FAX:> 1 (608) 835-2476 Web:> http://www.egg.bz | http://www.euca.us =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ devaulw@onebox.com

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

Why don't my carts expire (1998) Template not found error messages (1997) Upgrade to web DNA6.0 (2004) Generating unique SKU from [cart] - Still Stumped... (1997) emailer error -108 (1997) Problems adding stuff to the shopping cart. (1997) Resume Catalog ? (1997) [WebDNA] Grep (2009) Email...Thanks (1997) Bug? (1997) Resume Catalog ? (1997) breaking & sorting (2000) webcat2b12 CGI -- Date comparisons (1997) calculating tax rates, mail order solutions and version 2 (1997) Webstar 1.3.1 PPC (1997) Multiple cart additions (1997) Running 2 two WebCatalog.acgi's (1996) Using WC for Bulk Emailings (1997) [SHOWIF AND/OR] (1997) WebDna Consultants (2004)