Jump to content

File renamer


myspacee
 Share

Recommended Posts

hello,

UCR (unwanted char remover) is a command line script that rename file in given directory.

As command line script you MUST compile it with :

Aut2exe.exe /in UCR.au3 /out UCR.exe /console /unicode

Main Syntax :

ucr.exe c:\yourpath\*.jpg

if not exist .ini, .exe create badguy.ini whit follow structure :

z;r

g;z

first letter (es: z) is what you want to change

second letter (es: r) is what first letter change to

gozzo.doc -> zorro.doc

Switches are also introduced to menage different scenarios:

UCR.exe [path] [option]

UCR.exe \sourcedir\*.xyz : replace chars in accord with UCR.ini

UCR.exe\sourcedir\*.xyz -p : rename files with progressive number

UCR.exe \sourcedir\*.xyz -aZ9 : remove ASCII !#$%&'()+,-.;= @[]^_`{}~

UCR.exe\sourcedir\*.xyz -ext : remove extended ASCII (codes 128-255)

thanks for your time and help,

myspacee

Edited by myspacee
Link to comment
Share on other sites

upgrade:

- add switch to decide what change in file name (-rep/from:to/)

coding:

- possibility to add chars before or after filename

- decide start number for progressive switch

Include compiled exe and new source

any idea to implement ?

m.

Link to comment
Share on other sites

update :

-no switch : replace chars in accord with UCR.ini

-p : rename files with progressive number

-p/number/ : rename start from given number

-aZ9 : remove ASCII !#$%&'()+,-.;= @[]^_`{}~

-ext : remove extended ASCII (codes 128-255)

-rep/from:to/ : replace on the fly from with to

-pre/text/ : Add Prefix to filename

-suf/text/ : Add Suffix to filename

-low : lowercase filename

-UPP : UPPERCASE filename

-Upp1st : Uppercase only first letter

-fatx : modify to accomplish Xbox1 filesystem

maybe someone need it...

m.

Link to comment
Share on other sites

So does -rep/from:to/ : replace on the fly from with to handle any word(s)?

From your first post example, it implies that your rename only does 1 letter,

but can you have anything changed to other-thing like DVDRip to DVD, or Rip to blank?

The ability to specify the number of changes, example 1 means the first one found (like removing first '-' only)?

Can you specify a directory as a parameter?

Can the script work as a right-click context menu item?

Link to comment
Share on other sites

So does -rep/from:to/ : replace on the fly from with to handle any word(s)?

From your first post example, it implies that your rename only does 1 letter,

but can you have anything changed to other-thing like DVDRip to DVD, or Rip to blank?

The ability to specify the number of changes, example 1 means the first one found (like removing first '-' only)?

Can you specify a directory as a parameter?

Can the script work as a right-click context menu item?

Hello Garp,

my first post example is not so exhaustive, but maybe now a can find remedy.

UCR.exe [path] [switch] is the right syntax.

- no switch means that files renaming is baseg on .ini, so user can customize entire process.

Script 'gear' allow to play with filename as text string, so Autoit with its functions, allow to modify in a lot of ways.

"The ability to specify the number of changes" it's a good suggest to implement this function need small code,

i hope to put in next release.

Good idea also "right-click context menu item" maybe someone can link some aother examples script as literature,

i love to learn from this forum.

Next release contains -space switch (remove black spaces only [i forgot :) ]) and date support (nice & highly customizable)

Thank you all for reading,

m.

Link to comment
Share on other sites

  • 1 month later...

Hello Garp,

my first post example is not so exhaustive, but maybe now a can find remedy.

UCR.exe [path] [switch] is the right syntax.

- no switch means that files renaming is baseg on .ini, so user can customize entire process.

Script 'gear' allow to play with filename as text string, so Autoit with its functions, allow to modify in a lot of ways.

"The ability to specify the number of changes" it's a good suggest to implement this function need small code,

i hope to put in next release.

Good idea also "right-click context menu item" maybe someone can link some aother examples script as literature,

i love to learn from this forum.

Next release contains -space switch (remove black spaces only [i forgot :) ]) and date support (nice & highly customizable)

Thank you all for reading,

m.

I just used UCR and it accomplished what I wanted.... Thanks! a minor bug maybe. If I replaced "(large)" with "jim" it worked fine. But if I tried replacing " (large)" it did not work. Seems it doesn't like a leading space in the from string. I confirmed that by trying another replace with a leading space and it did not work either...
Link to comment
Share on other sites

hello,

UCR (unwanted char remover) is a command line script that rename file in given directory.

As command line script you MUST compile it with :

Aut2exe.exe /in UCR.au3 /out UCR.exe /console /unicode

Main Syntax :

ucr.exe c:\yourpath\*.jpg

if not exist .ini, .exe create badguy.ini whit follow structure :

z;r

g;z

first letter (es: z) is what you want to change

second letter (es: r) is what first letter change to

gozzo.doc -> zorro.doc

Switches are also introduced to menage different scenarios:

UCR.exe [path] [option]

UCR.exe \sourcedir\*.xyz : replace chars in accord with UCR.ini

UCR.exe\sourcedir\*.xyz -p : rename files with progressive number

UCR.exe \sourcedir\*.xyz -aZ9 : remove ASCII !#$%&'()+,-.;= @[]^_`{}~

UCR.exe\sourcedir\*.xyz -ext : remove extended ASCII (codes 128-255)

thanks for your time and help,

myspacee

I am not sure I replied to the correct posting so I am doing both Sorry!

I just used UCR and it accomplished what I wanted.... Thanks! a minor bug maybe. If I replaced "(large)" with "jim" it worked fine. But if I tried replacing " (large)" it did not work. Seems it doesn't like a leading space in the from string. I confirmed that by trying another replace with a leading space and it did not work either...

Link to comment
Share on other sites

Where can I find the .ini file format??? Maybe I missed it...

Generate by script first time you run it.

Its format:

yourbadchar;whatyouwant

z;g

1;vivaAutoit

etc...

Update script

MUST compile via command line:

C:\Program Files\AutoIt3\Aut2Exe\Aut2exe.exe /in UCR.au3 /out UCR.exe /console /unicode

m.

Edited by myspacee
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...