|
Answer» I have about 1000 .bmp files that all have the prefix 'Copy of' in front of them. What is the DOS command line to rename them deleting only the 'Copy of' ELEMENT? Hope you can helpPost this message to a programing language C forum . That would be easy for them .It's a BATCH problem pure and simple. Is the part after 'copy of' UNIQUE in each case?
provided you only have all "copy of" files and not their originals, here's a vbscript
Code: [Select]SET objFSO= CreateObject("Scripting.FileSystemObject") Set colFolders = objFSO.GetFolder("C:\test")
For Each oFile In colFolders.Files If InStr(1,oFile.Name,"Copy of",1) > 0 Then newName = Replace(oFile.Name, "Copy of ","") oFile.Name= newName WScript.Echo oFile.Name End If Next
|