Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.
Batch file renaming
Name: Bob8788 Date: May 18, 2008 at 12:27:56 Pacific OS: Windows CPU/Ram: 512 Product: Tiom
Comment:
I have a bunch of files named Invoice # xxxx.PDF that I would like to change to be Invoice xxxx.PDF. Does anyone know how to do that with a bash script? So far I have been thwarted in every attempt.
Name: Bob8788 Date: May 18, 2008 at 12:28:21 Pacific
Reply:
I use InnoRename to rename my huge picture files from my photo and my mp3 files too. Great program to try (find it there www.innoplanet.com). It can be programed and you can do a lot of combination easily. Try it.
The question belongs to the Programming Forum, but the following batch script (not bash!) does the job. That works in Win NT/2K/XP only NOT under Win 9X/ME.
@echo off & setlocal EnableDelayedExpansion for %%j in (invoice*.pdf) do ( set file=%%~nxj set file=!file:# =! echo ren "%%j" "!file!" ) :: End_Of_Batch
When you are sure it works as you planned, remove the echo in front of ren to make the renaming effective.
However I don't understand why you can't use your great InnoRename to do the job.
Summary: I am looking to have a batch file run when new information is entered into a given spreadsheet in an excel workbook. I want to be able to alert specific users of a shared work book that new informatio...
Summary: I need a batch file to delete all files in a folder EXCEPT those with a specific extension. Are there some IF commands I can use in a batch file to skip certain files, or is there a better way? Thank...