Close

Results 1 to 7 of 7
  1. #1
    DF Super Moderator
    evilsatan's Avatar
    Join Date
    Jul 2004
    Location
    Essex
    Posts
    20,079
    Thanks
    1,105
    Thanked:        3,241
    Karma Level
    1541

    Default Scan a directory and remove trailing spaces, illegal characters etc?

    Does anyone know of any software capable of this? I have a set of data which has trailing spaces, asterisks in the folder names etc. but there are hundreds of thousands of files so I can't clean them manually. Looking for software to scan the directory and remove trailing spaces from folder/filenames and any illegal characters etc.

    Cheers


  2. #2
    DF VIP Member DJ OD's Avatar
    Join Date
    Jul 2001
    Location
    On da decks.
    Posts
    10,114
    Thanks
    1,008
    Thanked:        2,254
    Karma Level
    1104

    Default Re: Scan a directory and remove trailing spaces, illegal characters etc?

    My mate wrote something to do this. Some weird renaming thing. I'll tap him up for it.


    DJ OD

    Thanks to DJ OD

    evilsatan (4th October 2015)  


  3. #3
    DF Super Moderator piggzy's Avatar
    Join Date
    Jul 2014
    Location
    UK
    Posts
    3,540
    Thanks
    3,063
    Thanked:        1,553
    Karma Level
    371

    Default Re: Scan a directory and remove trailing spaces, illegal characters etc?

    From memory I have used WinGrep to do similar, maybe not exact scenario but it is worth a try.

    Thanks to piggzy

    evilsatan (4th October 2015)  


  4. #4
    DF VIP Member JonEp's Avatar
    Join Date
    Oct 2007
    Location
    uk
    Posts
    2,250
    Thanks
    1,112
    Thanked:        875
    Karma Level
    395

    Default Re: Scan a directory and remove trailing spaces, illegal characters etc?

    Easy and quick to do in PowerGREP

    Thanks to JonEp

    evilsatan (4th October 2015)  


  5. #5
    DF VIP Member chizh's Avatar
    Join Date
    Oct 2000
    Location
    Manchester
    Posts
    610
    Thanks
    30
    Thanked:        131
    Karma Level
    330

    Default Re: Scan a directory and remove trailing spaces, illegal characters etc?

    http://www.bulkrenameutility.co.uk/Main_Intro.php has many options.
    I use it rarely but has come in useful for cleaning downloaded magazine titles that always have dots or underscores. Powerful but not as easy to set up/learn as Renamer from den4b.

    http://www.den4b.com/?x=products&product=renamer also has add-able rules so you can build rules and move them up/down to get the right renaming.

    I use http://rename.lupasfreeware.org/ for more basic renaming. Old but still does the job.
    Last edited by chizh; 4th October 2015 at 10:48 AM.

    Thanks to chizh

    evilsatan (4th October 2015)  


  6. #6
    DF Super Moderator
    evilsatan's Avatar
    Join Date
    Jul 2004
    Location
    Essex
    Posts
    20,079
    Thanks
    1,105
    Thanked:        3,241
    Karma Level
    1541

    Default Re: Scan a directory and remove trailing spaces, illegal characters etc?

    I've used bulkrenameutility before so will try that first and then move onto the other suggestions. Cheers


  7. #7
    DF VIP Member DJ OD's Avatar
    Join Date
    Jul 2001
    Location
    On da decks.
    Posts
    10,114
    Thanks
    1,008
    Thanked:        2,254
    Karma Level
    1104

    Default Re: Scan a directory and remove trailing spaces, illegal characters etc?

    This is from my mate:

    https://copy.com/EpjvTdfn7uVWo8ZO/rren.exe?download=1

    It only works on files in current directory, not subs.

    So c:\some folder\rren * /r “this crappy thing” “”

    That would look at each file name (*), and replace the string “this crappy thing” with “” .. blank.
    All the file names will go scrolling by with a 2nd line for them, with the new changed name.

    Rren *.mp4 /r “(xvid) {AC3} ” “by Dave”
    Would look at each mp4 file name, ignoring any others. If they had any instance of “(xvid) {AC3} ” in them, it would replace that with “by Dave” .. note the trailing *extra* space.

    Rren * /r “ “ “ “ ... would replace any double spaces happening, with single spaces. Can always run it a couple times to get rid of any hangers on, for eg a series of 4 spaces would become a pair only. 2nd run would make that into just a single one.


    It can append or prepend things to a file name /p /a “_this_” ... not too useful except maybe you want to add “DJ Overdose – “ to the start of each file, for eg. Mostly why I used it, to add the name of an album or artist to all tracks, before I moved them out of a directory specifically called album, or artist.

    It can “switch” parts of the name, around a “-“ symbol. So you could have a folder with files “trackname – artist.mp3” and /s would let you turn them into “artist – trackname.mp3” You’d have to check the switches for that one, cos it’s been ages since I used it.

    You could stick it and helper batch file into a folder in the path, and the batch file could call rren * /r “common junk in file names” “”, and so on, to get rid of often included shitty phrases


    DJ OD

    Thanks to DJ OD

    evilsatan (6th October 2015)  


Similar Threads

  1. "F" directory
    By McQueen in forum Microsoft Consoles
    Replies: 12
    Last Post: 31st October 2002, 05:32 PM
  2. Replies: 5
    Last Post: 22nd October 2002, 01:13 AM
  3. Len() function and spaces
    By keyscoob in forum Programming
    Replies: 7
    Last Post: 14th October 2002, 07:15 AM
  4. scan: driver
    By MAURICEMERSEYSI in forum PC Hardware
    Replies: 0
    Last Post: 10th October 2002, 08:34 AM

Social Networking 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
  •