VideoHelp Forum




+ Reply to Thread
Results 1 to 4 of 4
  1. Hi

    but the cats

    however

    please, I wonder if is there a way to find (in a batch procedure) all the files in the current folder that have the comma ","

    e.g. "Renewi Tour 5a tappa, 27 aug 2023.mp4"

    and automatically rename that files without the comma?

    the batch should find all the file in a folder that contain "," comma in path e remove the comma from the filename.

    If possible also multiple removing, comma and special characters like "#" or "*"



    thanks
    Last edited by marcorocchini; 9th Sep 2023 at 16:14.
    Quote Quote  
  2. Why bat file? What about using a software designed for that particular kind of tasks?

    What about a better script language, like vbs, Autohotkey, phyton, etc ?
    Quote Quote  
  3. Member
    Join Date
    Aug 2008
    Location
    Canada
    Search Comp PM
    I always use Bulk Renamer for that kind of task.

    https://www.bulkrenameutility.co.uk/
    Quote Quote  
  4. If possible also multiple removing, comma and special characters like "#" or "*"
    Please note that file names cannot include the character *

    Code:
    @echo off
    
    
    
    
    for  %%i in (*.mp4) do (	
    
    
    set file_name=%%~ni
    
    
    call :main 
    
    
    )
    
    
    goto program_complete
    
    
    
    
    :main
    
    
    echo "%file_name%" | sed -e "s#[, #]#_#g" | sed -e "s#.$##" | winclip -c
    
    
    for /f %%e in ('winclip -p') do set f_name2=%%e 
    
    
    ren "%file_name%".mp4 "%f_name2%".mp4
    
    
    goto :eof
    
    
    
    
    
    
    :program_complete
    echo.
    echo *** Program Complete ***
    echo.
    Quote Quote  



Similar Threads

Visit our sponsor! Try DVDFab and backup Blu-rays!