Jump to content

Need help with mass rename


Recommended Posts

lets take easy address C:\top_1000\file.mp3

Thats not a mass rename, thats a 1 file rename............... :)

Still more information needed, what do you want to remove from these directory?

What do you want to rename..?

Edited by R6V2
Link to comment
Share on other sites

FileListToArray()

StringRegExpReplace()

FileMove()

Yep, I was tring to get what he wanted to remove..

$Array = _FileListToArray(@DesktopDir)
For $i=1 To $Array[0]
$1 = StringRegExpReplace($Array[$i])
FileMove($Array[$i], $1)
Next

Something like the code above!

Link to comment
Share on other sites

It was example i have 1000 files in top_1000

I want keep names but i want remowe bad symbols

I want remoe all symbols and keep only

a..z A..Z 0..9 -_.

Edited by au3scr
Link to comment
Share on other sites

Thank you fot these replyes, but do you know any existing program for this?

I dont know how to make onescript from these tips

This is easy stuff, my grandma could do it. Don't forget this will strip spaces.

#include<file.au3>
$Array = _FileListToArray(@TempDir, "*.*", 1)
For $i=1 To $Array[0]
$result = StringRegExpReplace($Array[$i], "[^0-9a-zA-Z\.\-_]", "")
FileMove($Array[$i], $result)
Next
Link to comment
Share on other sites

weaponx i tried ur scrpt i still hade these parts in file names B$h4?0w.mp3

Here is my modification of your script

#include<file.au3>

$Array = _FileListToArray("Z:\top1000", "*.*", 1)

For $i=1 To $Array[0]

$result = StringRegExpReplace($Array[$i], "[^0-9a-zA-Z\.\-_]", "")

FileMove($Array[$i], $result)

Next

Edited by au3scr
Link to comment
Share on other sites

It was in example script beacause i didnt look where i am at posing and now it is in cheat beacause i asked if some one know program to do it?

but people didnt say me programes, people started to post theyr source here?

Link to comment
Share on other sites

It was in example script beacause i didnt look where i am at posing and now it is in cheat beacause i asked if some one know program to do it?

but people didnt say me programes, people started to post theyr source here?

Where are you from?

Link to comment
Share on other sites

I have problem.

Windows dont allow rename them, i havi too bad symbols in file name

like $ and ? in file names so i need an other method to rename them.

DONE

I did it with krename under linux

NB! weaponx's source is perfect, tnx

Edited by au3scr
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...