KioskeaKioskeaCommentCaMarcheSign up, it's free !
Wednesday July 9, 2008 - 2:46:48 am BST
batch file name(s) in memory? os Xp
par god09
 Threaded discussions
Statut : Not resolved
Sunday March 9, 2008 06:52:21 PM
Hello,
How would I go about writing a batch file to copy all the file names in a folder...just the file names not the files and then rename them to something standard like "video1.avi", "video2.avi",etc. THEN when I'm ready rename them to the original file name.
I am using WINFF to convert some files in the command line but it doesn't convert all files in a folder...it will only work if I specify the exact file name. So I was thinking of renaming all the files to something standard so the program can run without user interaction and then when it is done the files will be renamed to the original.

The number of files vary...it could be one or ten.
Configuration: Windows XP
Internet Explorer 6.0
Reply to god09  Report this message to moderators Go to last message

1


  • This message seems useful, vote!
  • Report this message to moderators
By Themask02, on Monday March 10, 2008 09:58:15 AM Threaded discussions 
Run this on the FOLDER, NOT a FILE in he FOLDER:

@ECHO OFF
CD /D %1
IF EXIST TempName.lst GoTo Restore
FOR %%a IN (*.*) DO CALL :TempName "%%a" >> TempName.lst
GoTo END
:Restore
FOR /F "DELIMS=" %%a IN (TempName.lst) DO REN %%a
DEL TempName.lst
GoTo END

:TempName
IF %1=="%~nx0" GoTo END
IF %1=="TempName.lst" GoTo END
SET UseName=0
:TEMPNAME-LOOP
SET /A UseName+=1
IF EXIST %UseName%%~x1 GoTo TEMPNAME-LOOP
REN %1 %UseName%%~x1
@ECHO %UseName%%~x1 %1
Reply to Themask02
Currently no message on this subject
Reply
Message title :
Your nick:
Your E-mail :
Message: 
  •  
  •  
Options: Get the answers by mail.
 

Help