Jump to content

Recommended Posts

Posted

I don't know about Mass, but you would use FileMove() and that is a renamer.. :)

For a Mass FileMove() You would need a For/Next loop.

Posted

I can do this within AutoIt, I just need more information, all the files on the desktop? All computer files?

Posted (edited)

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

or you can do desktop\top_1000

Edited by au3scr
Posted (edited)

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
Posted

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!

Posted (edited)

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
Posted

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 -_.

$fileName = "!@#@#$%#%#^file_#$%$%123-b.txt"

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

MsgBox(0,"",$result)
Posted

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

I dont know how to make onescript from these tips

Posted

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
Posted (edited)

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
Posted

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?

Posted

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?

Posted (edited)

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

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
  • Recently Browsing   0 members

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