SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot detzX's Avatar
    Join Date
    Oct 2006
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Windows gurus, need help on this.

    OK, I only use Linux but I need to do this on a Windows machine. I have 1000 folders numbered from 000 - 999 with something after them(e.g. 001 - folder test) but I need to remove the numbers for the folder name. Is there a quick way I can do this without rename each folder by hand, a bat file possible?

    Thanks.
    www.invoicejournal.com - Invoice clients for Free

  2. #2
    SitePoint Wizard drhowarddrfine's Avatar
    Join Date
    Aug 2005
    Posts
    3,438
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Why don't you just do it in Linux first?

  3. #3
    SitePoint Wizard rozner's Avatar
    Join Date
    Oct 2002
    Location
    Paris
    Posts
    1,058
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You should be able to write a batch file (shell script in the linux world) to do this. There's plenty of docs on that, not sure how well you can do things like regular expressions in windows as I've never tried it. If not you can try something like cygwin, which essentially gives you a linux shell in windows (sort of...). Then you could just use a linux type script. Or as the drhoward says, do it on linux... Can you not just transfer these files to a linux system and do it there, then transfer back to windows?

  4. #4
    SitePoint Zealot detzX's Avatar
    Join Date
    Oct 2006
    Posts
    135
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by drhowarddrfine View Post
    Why don't you just do it in Linux first?
    The folders contain 382GB of data...I don't want to transfer that to a linux box just to rename the folders.
    www.invoicejournal.com - Invoice clients for Free

  5. #5
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,271
    Mentioned
    252 Post(s)
    Tagged
    1 Thread(s)
    You need to write a small program to do that. Any kind of C, or Visual Basic, .NEt, or any compiled language will do.

  6. #6
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,653
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Best bet would be to use Windows Powershell, which actually should feel alot more like your familiar linux shell anyhow.

    Couldn't tell you exactly how to do it though . . .


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
  •