Renaming Wav files
Closed
                                    
                        kardiva                    
                                    -
                            Mar 31, 2010 at 07:34 AM
                        
Richard.Williams Posts 25 Registration date Saturday November 7, 2009 Status Member Last seen July 18, 2012 - Apr 26, 2010 at 04:05 PM
        Richard.Williams Posts 25 Registration date Saturday November 7, 2009 Status Member Last seen July 18, 2012 - Apr 26, 2010 at 04:05 PM
        Related:         
- Renaming Wav files
 - Can jpg files have viruses - Guide
 - Upload files to mediafire - Guide
 - Create rar files mac - Guide
 - How to open msi files on android - Guide
 - How to open .swf files - Guide
 
4 responses
                
        
                    Richard.Williams
    
        
                    Posts
            
                
            25
                
                            Registration date
            Saturday November  7, 2009
                            Status
            Member
                            Last seen
            July 18, 2012
            
            
                    14
    
    
                    
Apr 26, 2010 at 04:05 PM
    Apr 26, 2010 at 04:05 PM
                        
                    Try this biterscripting script.
If the _ were to word separator, you want the 8th, 9th, 3rd and 7th word.
Copy and paste script code in file C:/Scripts/RenameWav.txt, start biterscripting, use this command.
It will rename all .WAV files under folder "C:/test" accordingly.
I don't think this script is perfect, so please test it first on a test directory. I have not been able to test it.
            If the _ were to word separator, you want the 8th, 9th, 3rd and 7th word.
# Script RenameWav.txt
var str dir, list, path, name, newname
var str w8, w9, w3, w7
set $wsep="_"                                       # Set the word separator
cd $dir ; lf -r -n "*.WAV" > $list
while ($list <> "")
do
    lex "1" $list > $path ; stex -p "^/^l[" $path > $name
    wex -p "8" $name > $w8
    wex -p "9" $name > $w9
    wex -p "3" $name > $w3
    wex -p "7" $name > $w7
    set $newname = $w8+"_"+$w9+"_"+$w3+"_"+$w7+".WAV"
    system rename ("\""+$path+"\"") ("\""+$newname+"\"")
done
Copy and paste script code in file C:/Scripts/RenameWav.txt, start biterscripting, use this command.
script "C:/Scripts/RenameWav.txt" dir("C:/test")
It will rename all .WAV files under folder "C:/test" accordingly.
I don't think this script is perfect, so please test it first on a test directory. I have not been able to test it.
                        
                    I have more than 500 files to named as such on a daily basis "F2" will will be time consuming.
Kardiva:-)
            Kardiva:-)
                
        
                    closeup22
    
        
                    Posts
            
                
            8922
                
                            Registration date
            Friday May 15, 2009
                            Status
            Member
                            Last seen
            October  7, 2010
            
            
                    2,099
    
    
                    
Mar 31, 2010 at 08:00 AM
    Mar 31, 2010 at 08:00 AM
                        
                    Hi there,
select the file,then press F2 to rename or right click on it and select rename and enter the mentioned name.
Thanks
            select the file,then press F2 to rename or right click on it and select rename and enter the mentioned name.
Thanks
                        
                    @echo off
for %%i in (*.Wav) do (set fName=%%i) & call :10
goto :eof
:10
@echo off
for %%i in (*.Wav) do (set a=%fname:~31,2%) & call :20
:20
set b=%fname:~47,2%
set c=%fname:~50,11%
set d=%fname:~62,12%
ren %fName% %c%.%d%_%a%_%b%.wav
pause
This returns the file name as "29-Mar-2010.10.29.32.400_01_46.wav"
whet Do i do if i want to convaer the mar to 03
Kardiva:-)
            for %%i in (*.Wav) do (set fName=%%i) & call :10
goto :eof
:10
@echo off
for %%i in (*.Wav) do (set a=%fname:~31,2%) & call :20
:20
set b=%fname:~47,2%
set c=%fname:~50,11%
set d=%fname:~62,12%
ren %fName% %c%.%d%_%a%_%b%.wav
pause
This returns the file name as "29-Mar-2010.10.29.32.400_01_46.wav"
whet Do i do if i want to convaer the mar to 03
Kardiva:-)