![]() |
![]() |
![]() |
|||||
![]() |
![]() |
![]() |
![]() |
![]() |
|||
| Welcome
to Tech Support Forum home to more then 136,000 problems solved. Issues
have included: Spyware, Malware, Virus Issues, Windows, Microsoft,
Linux, Networking, Security, Hardware, and Gaming Getting your
problem solved is as easy as: 1. Registering for a free account 2. Asking your question 3. Receiving an answer Registered members: * See fewer ads. * And much more..
|
| Want to know how to post a question? click here | Having problems with spyware and pop-ups? First Steps |
|
|||||||
| Web Design & Programming Discussion of web design, and server-side & client-side scripting |
![]() |
|
|
LinkBack | Thread Tools |
|
|
#1 (permalink) |
|
Registered User
Join Date: Jan 2008
Posts: 4
OS: WINDOWS XP
|
I have some files as shown below.
AAAAAAAB.AOX AAAAAAAB.AOY AAAAAAAB.AOZ I need to rename it by DOS/WINDOWS batch script as given below AAAAAAABAOX.ICA AAAAAAABAOY.ICA AAAAAAABAOZ.ICA Please suggest how to write the batch. There are almost millions of files to rename in this way. Thanks in advance |
|
|
|
| Important Information |
|
Join the #1 Tech Support Forum Today - It's Totally Free!
TechSupportForum.com is a leading support website for your computer needs. We offer free, friendly and personalized computer support. Why pay to have your computer fixed when you can do it for free. Join TechSupportforum.com Today - Click Here |
|
|
#3 (permalink) |
|
Registered User
Join Date: Jan 2008
Posts: 4
OS: WINDOWS XP
|
Re: Renaming files with . dot
Thanks for your reply.
I am using Windows system. Some windows batch will help. With simple rename command I could not remove .(dot) from the file name. I need to remove the 9th character add the extention .ICA Please see the question once again. Thanks in advance |
|
|
|
|
|
#4 (permalink) |
|
Manager, TSF Articles
|
Re: Renaming files with . dot (Moved from Windows XP)
I've moved your thread into Programming where you may get more help.
__________________
If you feel that TSF has helped you please make a donationand help to keep the forum free Cenedl heb iaith, cenedl heb galon |
|
|
|
|
|
#5 (permalink) |
|
Registered User
|
Re: Renaming files with . dot (Moved from Windows XP)
can you see the extension? If you want to rename it in windows, and also be able to edit the extension, simply enable viewing of extensions, in options.
Tools\Folder Options Select the "View" tab. Scroll down to "hide file extensions for known file types" Uncheck it. You can now change the extension, by simply renaming (F2) and entering name as: name.extension |
|
|
|
|
|
#7 (permalink) |
|
Manager, TSF Articles
|
Re: Renaming files with . dot (Moved from Windows XP)
Habool has made it clear that he doesn't just want to change the extension, but wants to make the existing extension part of the filename by removing the dot and then adding the .ICA extension.
__________________
If you feel that TSF has helped you please make a donationand help to keep the forum free Cenedl heb iaith, cenedl heb galon |
|
|
|
|
|
#8 (permalink) |
|
Registered User
Join Date: Feb 2009
Posts: 3
OS: Vista
|
Re: Renaming files with . dot using biterscripting
I use biterscripting to do things like this - especially if you have millions of files. I wrote a quick script for you. Save the following script in a file called FileRename.txt, start biterscripting interactive (for free download, http://www.biterscripting.com), then invoke the script as follows.
cd <your directory where these files are located> script FileRename.txt Also, if you do this repeatitively, you can call this script in a batch mode from DOS prompt, any other program, using a shortcut on the desktop, or using a scheduled task. The script will work on every version of windows. Hope this helps. If you make this script better than my version, please do not forget to repost it for the benefit of others. Patrick # START OF SCRIPT # Collect list of files. There may be variable number of files. var str list lf -n "AAAA*" > $list # Process files one at a time while ($list <> "") do # Get the next file var str file lex "1" $list > $file # Create new file name var str new_name # Remove the dot from file name, but only the last dot. sal -p "^.^l" "" $file > $new_name # sal=string alterer, -p preserve $file - we will need it for the rename command. # Add .ICA set $new_name = $new_name+".ICA" # Rename file script SS_SlashBack.txt ospath($file) > $file stex "^/^l]" $new_name > null system rename ("\""+$file+"\"") ("\""+$new_name+"\"") done # END OF SCRIPT |
|
|
|
|
|
#10 (permalink) |
|
Design Team Member
Join Date: Jul 2007
Location: Coventry, UK
Posts: 1,880
OS: Vista, various linux distros
|
Re: Renaming files with . dot (Moved from Windows XP)
Okay if you want a simple way to do this:
- Download the "Superb Batch Renamer": http://www.1-4a.com/rename/ - Once you've downloaded it, run the program. - Navigate to the folder (In the treeview of your system) - Change the radio button underneath the treeview to "Whole Name" - Tick the replace button - In "Replace this" put a "." - Delete the contents of the "with that" box (so that its empty). - Click the Start Button Then to add the .ica extension: - Click the extension radio button (below the treeview) - Click the replace check box - Delete the contents of the "replace this" textbox (so that everything is included) - In the "With that" box put ".ica" - Press the Start button Sorry for the long winded solution but in all honesty it's the only one i've found which requires no actual programming. Hope this helps. Cheers, Jamey Last edited by jamiemac2005; 02-09-2009 at 05:45 AM. |
|
|
|
|
|
#11 (permalink) |
|
Manager, TSF Articles
|
Re: Renaming files with . dot (Moved from Windows XP)
Thanks Jamey. Let's see how Habool gets on with those suggestions.
__________________
If you feel that TSF has helped you please make a donationand help to keep the forum free Cenedl heb iaith, cenedl heb galon |
|
|
|
![]() |
| Thread Tools | |
|
|