SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    SSH Recursive Renaming

    Is there a way to do this.

    Rename every file in the directory to go:
    1.jpg
    2.jpg
    3.jpg
    etc?

    doing this by hand is taking forever LOL.

  2. #2
    SitePoint Evangelist mrwooster's Avatar
    Join Date
    Jan 2006
    Posts
    518
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should be able to create a bash script to do this.....

  3. #3
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Im not sure what to lookup for this, I don't know how to do Perl or whatever needs to be done for this.

    "SSH Recursive Renaming Digits" - is that the name? I am looking for things on the Google.com site.

  4. #4
    SitePoint Zealot cpace1983's Avatar
    Join Date
    Sep 2009
    Posts
    153
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This should get your feet wet:
    http://www.debian-administration.org/articles/150

    If you're already familiar with regex, you might opt for the 'rename' portion at the bottom of the tutorial.
    I am a Freelance Linux Consultant.
    I offer flat rate Linux support, as well as hourly support.
    Feel free to visit my blog, Ramblings of a Linux Administrator.

  5. #5
    SitePoint Wizard
    Join Date
    Mar 2008
    Posts
    1,149
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use any programming language that can be interpreted from the command line.

    I know you know PHP, so just write a PHP script and run php /path/to/script.php, or put #!/usr/bin/env php at the top of your PHP script, make it executable, and then run it: ./yourscript.php

  6. #6
    John 8:24 JREAM's Avatar
    Join Date
    Sep 2007
    Location
    Florida
    Posts
    1,508
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hey thanks guys,

    Im going to try this PHP thing too very cool!!!!!


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •