A
A
Arman2015-09-09 19:34:35
Command line
Arman, 2015-09-09 19:34:35

How can I quickly rename files in a folder?

Good evening.
There are windows and MAC OS X at hand, but there is really no Internet, so nothing convenient like php, etc. there is no way to put. Should be done through a bat-file or sh, well, or what standard in the OS would you recommend?.
And the problem is this: the car radio hangs when there is some garbage in the file name, there is a folder with music (1500 files), you need to quickly remove the garbage in the names. It turns out something like

<?php
$filename = preg_replace('`[^a-zа-я0-9\-\.\, ]+`uis', '', $filename);
?>

where can i start digging? Can the MV utility work like this? Or maybe already ready-made?
thanks in advance

Answer the question

In order to leave comments, you need to log in

2 answer(s)
E
Eugene, 2015-09-09
@Arik

if you do not have an antediluvian version of windows, then there is powershell (run powershell.exe), which means there are regular expressions:
In order to edit the regular expression yourself - get-help regular in the powershell console

P
Philip Polikarenkov, 2015-09-10
@Vilibb

There is a wonderful program - Renamer.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question