How to Remove first 2 characters on command line

Post any Bulk Rename Utility support requirements here. Open to all registered users.

How to Remove first 2 characters on command line

Postby fokeiro2020 » Thu Mar 19, 2020 2:20 am

hi guys im using the command line to rename some files inside folders

Code: Select all
BRC64.exe /DIR:"E:\PDF" /NOFOLDERS /RECURSIVE /NODUP  /STRIPDIGITS  /EXECUTE


but also after need to rerun and only remove the first 2 characters on each file inside some folders

is this possible on command line ?
fokeiro2020
 
Posts: 2
Joined: Thu Mar 19, 2020 2:16 am

Re: How to Remove first 2 characters on command line

Postby RegexNinja » Thu Mar 19, 2020 6:16 am

Hi,

/RemoveFirstN:2 permanently removes the 1st-2 characters
/CutFirstN:2 also removes them, but lets you to paste them back-in later, if needed

Cheers
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm

Re: How to Remove first 2 characters on command line

Postby fokeiro2020 » Thu Mar 19, 2020 2:22 pm

RegexNinja wrote:Hi,

/RemoveFirstN:2 permanently removes the 1st-2 characters
/CutFirstN:2 also removes them, but lets you to paste them back-in later, if needed

Cheers


great thanks for the help for some reason replace _ also replaces - im not sure why so if I have TEST_FILE-NAME.jpg using replace _ give me TESTFILENAME.jpg
fokeiro2020
 
Posts: 2
Joined: Thu Mar 19, 2020 2:16 am

Re: How to Remove first 2 characters on command line

Postby RegexNinja » Fri Mar 20, 2020 10:21 am

Hi.. That shouldnt be the case.. Do you have multiple /Replace-commands ??
Its probably some other command doing it.. Feel free to post the whole command-line.
For the record, syntax is like:

/ReplaceCI:"__Remove__:__Replace__"

If you omit Replace, then Remove is just removed.
Cheers
RegexNinja
 
Posts: 134
Joined: Fri Feb 21, 2020 5:26 pm


Return to BRU Support