Changing file extension ..

i have a files like *.aaa
*.aaa
*.bbb
*.bbb
*.ccc
*.ccc
*.ccc
*.ddd
*.ddd
like this i 've to write a scripte to convert *.aaa files to .a,*.bbb files to .b,*.ccc files to .c and any rather than this files convert to *.txt

Perhaps the following shells script will do the job:
<pre>
for file in *; do
case $file in
*.aaa) mv $file ${file%.*}.a ;;
*.bbb) mv $file ${file%.*}.b ;;
*.ccc) mv $file ${file%.*}.c ;;
*) mv $file ${file%.*}.txt ;;
esac
done
</pre>

Similar Messages

  • Change File Extensions (Newbie)

    I want to exchange .html extensions to .php in a folder. Actually, someone showed me how to it with AppleScript. However, someone else told me about Autmator, which looks like a really cool tool. Unfortunately, I can't figure out how to change file extensions with it.
    When I open Automator, I get a little window that lists seven scripts or functions, beginning with Change Extension. If I right-click on Change Extension and choose open with Automator 2.0, I get a bigger window ("untitled") with a long list of actions on the left. Again, I click Change Extensions.
    On the right is a little box titled "Ask for Finder Items." It includes three options:
    Prompt, Start at and Type. But I don't know how to precede. How do I indicate what file extension I want to change from or to?
    I first asked about Automator on a thread at
    http://discussions.apple.com/thread.jspa?messageID=9490359#9490359
    Someone posted an image that shows a second window where you type in the file extensions you want to work with. But I can't figure out how to make that window appear on my program.
    Thanks for any tips.

    Here's a simple solution. Select all the files in the folder by navigating to the folder in the Finder. With the files displayed press COMMAND-A to select them all. Press OPTION-COMMAND-I to open the Inspector window. In the Name and Extension field change the extension from .html to .php. Close the window.
    For more complete control over batch file changes download BatchRenameEm - VersionTracker or MacUpdate.

  • Download ZIP file without changing file extension

    I regularly download a zipped csv file, of the format: "filename.csv.gz". As the name does not change, Firefox adds a digit to distinguish it, so for example I get "filename.csv-3.gz". This is a pain as it changes the file extension which means that I cannot open the extracted file without first renaming it. I want to keep an archive of all the files, so deleting them each time isn't really an option, and neither is moving them to a different location each time. Is there any way the naming convention for downloads can be changed?

    I think you have to disable it in your Operating system:
    8dot3NameCreation
    [http://support.microsoft.com/kb/121007]

  • Change file extension in receiver file adapter

    File to File Scenario
    Posted: Sep 11, 2006 3:47 PM      Reply      E-mail this post 
    I am working on a File to File scenario.
    Source System gives out a file: abc ( with no extension)
    We need to archive it as: abc.done
    And we need to send it to a FTP server ( receiver File adapter) as abc.txt.
    How can I append a file extension when I archive and
    how can I change the file extension in the receiver File adapter?
    FYI, we are using XI as FTP server so I have created dummy message interface with no mapping.

    Hi,
    If I understood correctly once XI picks up the file it should be archieved as filename.doc and then it should be FTP'ed to a different location with a change in extension filename.txt.
    1. To Archive in the sender communication channel you can use OS Commands after prosessing (>=SP14) to rename the file and archive it. Suggested write a batch file which will rename the file and call the batch file from the OS Command of the sender file adapter. You can either use Archive functionaliy of the Sender adapter or you can write one more command in batch file to move the file to different folder. Make sure you are using fullpath while writing batch file.
    2. As said use dynamic configuration in a dummy mapping and then get the source file name and change the extension.
    http://help.sap.com/saphelp_nw04/helpdata/en/43/03612cdecc6e76e10000000a422035/content.htm
    Thanks,
    Prakash

  • Illustrator extend script save() changes file extension

    If I open a PDF in Illustrator, make a change, and save using the menu option or shortcut, the file is saved as expected.
    If I try to use extend script (i.e. app.activeDocument.save(), or .saveAs()), the file extension is renamed to .ai. How do I keep my original filename when saving with extend script?

    Got it working by using .saveAs() with PDFSaveOptions

  • Mistakenly change file extension while in disk use mode

    I made the mistake of changing the file extension of a file on my Nano (5G) while it was in "disk use" mode. When I unplugged the device and later plugged it in, the modified file was gone. Does the Nano treat unrecognized files as non-existant? I tried using Windows Explorer to find the file, but nothing was there. Also, the overall memory used on the Nano has decreased by what I would guess is the same amount as the missing file. I'd like to get my file back. Any suggestions?

    Processing Raw in a 3rd Party Application
    You can also process your Raw with a 3rd Party app like ACR or Photoshop. But iPhoto does not handle this gracefully and it's a bit of a kludge.
    First off set your preferred app as an external editor in iPhoto:
    You can set Photoshop (or any image editor) as an external editor in iPhoto. (Preferences -> General -> Edit Photo: Choose from the Drop Down Menu.) This way, when you double click a pic to edit in iPhoto it will open automatically in Photoshop or your Image Editor, and when you save it it's sent back to iPhoto automatically. This is the only way that edits made in another application will be displayed in iPhoto.
    Note that iPhoto sends a copy+ of the file to Photoshop, so when you save be sure to use the Save command, not Save As... If you use Save As then you're creating a new file and iPhoto has no way of knowing about this new file. iPhoto is preserving your original anyway.
    Next: In the iPhoto Preferences -> Advanced, elect to use Raw with your External editor:
    Uploaded with plasq's Skitch!
    Now when you go to edit the Raw it will be sent to your external editor.
    Now for the kludge:
    You cannot save a Raw. The work you do must be output to a new file, in a new format (jepg, tiff, whatever). However, as the External Editor is making this new file iPhoto has no knowledge of its existence. Therefore you *must save it to the desktop and then import it back to iPhoto as a new file*.
    This means that you will have your Original Raw and the processed version in iPhoto but they will not be recognised as version and original. iPhoto will see them as two separate shots.

  • Change document type without changing file extension

    I've recently started using Dreamweaver CS3 after nearly a decade on Homesite (which regrettably wouldn't work on my new Windows 7 machine). I like Dreamweaver's code view but find it lacking in some of the flexibility and intelligence that Homesite had.
    Case in point: I work on a rather large site that uses Classic ASP. Most of the site uses .html file extensions, but we have these configured to be processed through the ASP engine. When editing the pages on this site, Dreamweaver sees the .html file extension and assumes they're regular HTML documents, and color codes them accordingly, but it can't figure out ASP comments and code blocks and mangles the color coding. If I try to change the Document Type (in the Application > Server Behaviors panel), Dreamweaver insists on changing the file extension too.
    It appears I can modify Dreamweaver's MMDocumentTypes.xml file so that it thinks .html files are ASP. But I don't want to do this globally for ALL the sites I work on, only for this particular site. It would be really nice if I could change the document type definitions on a per-site basis, or to change the document type for a file without having to change the file extension. Surely I'm not the first person to use non-standard file extensions on webpages. Any ideas on how to fix this?

    I think you have to disable it in your Operating system:
    8dot3NameCreation
    [http://support.microsoft.com/kb/121007]

  • Changing file extension for Blu-Ray H264 export

    The output is written as .m4v, and my authoring tool will not accept this.
    It must be any of the following: m2v, m2p, mpg, mpeg, avc, 264, h264 bsf or vc1
    Can I simply change the extension - or is there a way to get the correct extension I need?
    (CinemaCraft allows you to define the extension used, for example)

    Any containering around the raw .264 video stream will screw up the embedded information.
    Non-Encore Bluray authoring tools will not accept any file format that is containering that stream.
    Also, if you want your bluray to be "legal" - ie be possible of passing a verification suite for pressing at a repro house - you have to export to raw .264 (thus why high end author tools won't import .m4v, mp4, mov etc).
    So, not you can't just change the extension. a m4v file is a ISO media container that holds a video stream... yes m4v, mp4 and mov are all based on the same standard - and yes you can thus change the file extension and it often works but......
    ... in this case you need a raw h.264 stream as a file (.264).
    The only thing I can think of is that you container it to MPEG-Transport Stream (MPEG-TS) with the file extension .mpg.
    It has the highest chance of import but I'm not sure if it destroys the h.264 stream's ability to pass BD verification.
    Note also that I've heard that the bundled H.264 encoder (made by Main Concept) does not have the mandatory "slice" support for AVC level 4.1 and higher so if you encode at that level it's already an illegal stream that you can guarantee will not play ok in every consumer blu-ray player.
    my 2c,
    Rallymax.

  • Changing file extensions disables any finder keyboard input

    Hi all,
    Well, i just said it. Oftentimes (very often) when I change a file extensions, after clicking yes to the most annoying confirmation dialog a web designer can find on OSX, the finder stops receiving any input from the keyboard.
    What happens is that after the extension change, I can select file names and do everything the mouse can do in the finder, but no keyboard input is received, I just cannot type any character whatsoever.
    Anyone with the same problem? A solution? A hint?
    I'm on Tiger 10.4.5, xtools2 installed.
    PowerBook G4 15'' 1GHz (512MB RAM)   Mac OS X (10.4.5)   iPod 3G (40GB), External FireWire HD (20GB)

    Have you tried trashing Finder prefs? Navigate to ~(yourhome)/library/preferences and trash these two files:
    com.apple.finder.plist
    com.apple.sidebarlists.plist
    Then log out and back in again. Or restart.
    (You will have to reset a few finder prefs the way you like them.)
    -mj
    [email protected]

  • Photoshop will no longer automatically change file extension when I do a "save as".

    I have just now been to Preferences to make desired settings for needed grid lines.  Now Photoshop 9 will no longer automatically change the file extension when I do a "save as".  Does anyone have any ideas or suggestions about this?  I am using a Mac.  Thank you.

    Are you still facing the issue, can you try deleting preferces and then try it.
    If still get no succes please lemme know the scenario you are using for saving file.
    Cheers,
    Sam

  • Change File Extension

    Hi Experts
    I am pulling a .txt file from a location and dropping it to another location using file adapter. Is there a way I can change  the file extension .txt to .xml when I drop the file?

    Hi Skaria -
    Make sure you're not using the Adapter Specific Message Attributes (ASMA) option on your receiver file channel.   If you need to use it for something other than the file name attribute, you can still select the "Use Adapter Specific Message Attributes", but then unselect "File Name".
    However, if you need use the same file name as is picked up, but just with a different extension, you have to change ASMA filename in the message header (e.g. in a mapping).
    Regards,
    Jin

  • Changing file extensions to lowercase

    Lightroom 3 offers the possibility to change the file extension to uppercase ou lowercase during file import.
    I would prefer to have this new feature made available as a file naming preset option, so that I can use it also for the pictures already in the catalog.
    As part of file naming presets, it would be available everywhere.

    I'd like to second this feature request. I've got a bunch of images that ended up in the catalog with uppercase extensions. While it's not a technical issue, my the naming convention I use calls for lower case, but I don't see a way to change the extension on the files without removing them from the catalog and then importing them again. It would be much nicer to have a file rename option that includes the ability to change the case of the extension to either all upper or all lowercase.
    Thanks.
    -a

  • Changed file extension FCP cant find the files

    I am working on an old project created with FCP2. The captured source clips do not have a file extension and it was giving me trouble sending clips over to Motion. I changed (manually) the file extension of one file to see what happens. Predictably FCP could not locate the file and I had to relink. The problem is that every time I opened FCP it gave me the same error. So I manually REMOVED the extension. FCP still gives me the same error message! and I have to manually find the file each time I open the project. In the finder the files without an extension show up as a black icon, but the file I messed around with the extension now shows up as a QT icon (even though i deleted the extension). Any advice on how I can get FCP to recognize the file once and for all, and maybe how to better change extensions? gracias!

    From the Finder, right click one of the files and choose Get Info.
    In that window you will see a section "Name and extension".
    There is a checkbox to hide/show the extension.
    You can also apply the hide/show option for everything at once in Finder > Preferences > Advanced.
    Back to that Get Info window: What application is listed under the "Open With" section?

  • We can fool DynamicFS by changing file extension

    Dynamic File Services only detects file via extensions, rather then data type, e.g I have a policy which moves 'audio' and 'video' files to Secondary storage, the policy works only if files have proper extension, but if I rename songs.mp3 to songs.txt, policy wont work, i.e policy wont be able to move 'songs.txt' to Secondary path.
    am I missing something, or the Dynamic File Services can only work with file extensions ?

    On 08/12/2010 20:39, needee wrote:
    > Dynamic File Services only detects file via extensions, rather then data
    > type, e.g I have a policy which moves 'audio' and 'video' files to
    > Secondary storage, the policy works only if files have proper extension,
    > but if I rename songs.mp3 to songs.txt, policy wont work, i.e policy
    > wont be able to move 'songs.txt' to Secondary path.
    >
    > am I missing something, or the Dynamic File Services can only work with
    > file extensions ?
    No you are not missing something - whether the Filter Option for your
    policy is File Patterns or File Types then it's the filename and/or
    extension that dictates whether a particular file is moved.
    Of course a user would, for your particular example, have to run the
    Windows Media Player and then open songs.txt in order for it play
    because if they renamed songs.txt back to songs.mp3 then the policy
    might kick in and move the file.
    Personally I'd say this is acceptable since examining the file content
    would add an overhead to the process but if you think otherwise I'd
    suggest logging an enhancement request via www.novell.com/rms.
    HTH.
    Simon
    Novell Knowledge Partner (NKP)
    Do you work with Novell technologies at a university, college or school?
    If so, your campus could benefit from joining the Novell Technology
    Transfer Partner (TTP) program. See novell.com/ttp for more details.

  • Mail Adapter Change File Extension

    We have the receiver mail adapter setup to send the contents of a message to an internal email account. The adapter works and the message arrives as a soap.xml and payload.xml. The problem is that our mail system blocks the xml extension. Is there an easy way to switch the extensions from say xml to txt on the messages.
    It looks like the PayloadSwapBean module can change the content type, but I just want to alter the extensions. I know I could use an XSLT to convert the contents to html and then just send the message as an html email but I was hoping to avoid design changes.
    Regards

    J,
    Check note : 856599
    <i>Q: Can I choose the name of an attachment in the mail?
               A: Yes. Most mail clients use some heuristics based on some MIME headers to derive the name of an attachment. The MIME headers involved in most heuristics are Content-Type, Content-Description, and Content-Disposition. When you create an XI message, the XI payload name is automatically set in the Content-Description. If you want to change or set all of these headers, you can use the MessageTransformBean module (Note 793922) in the adapter framework.
                Related questions: How can I set the file name of a mail attachment?
    Q: How can I set the file name of a mail attachment?
                There are several MIME headers that play a role in how the client retrieves the file name of an attachment. Unfortunately, this behavior differs among various mail clients. The reason for this inconsistent behavior comes from the fact that this mechanism has been extended incrementally. The old way is to use the name parameter in the Content-Type header as specified in RFC1341. For example, you can set the content type of an XML attachment as:
               Content-Type: application/xml; name="abc.xml"
                RFC1521 discourages the use of this name parameter in anticipation of the new header Content-Disposition, which is defined in RFC1806.
                With this Content-Disposition header, you can set the file name as:
               Content-Disposition: attachment; filename="abc.xml"
                Some clients may show the Content-Description value as the file name. The Content-Description header is typically used to associate some descriptive information to an attachment (RFC1341) as in
               Content-Description: my xml file
                To avoid potential interpretation problems, it is recommended to combine the use of these headers.
    How to use MailPackage in Receiver?
                A: When a mail message is sent out by the receiver adapter, normally the mail header information such as "From", "To", "Subject" are taken from the channel configuration. In order to dynamically set these headers, you can use the MailPackage mode. In this case, the XI payload must be formated in the Mail Package XML format. The format of this mail package XML document is defined in note 748024.</i>
    Use the mail Package and the set the <b>Content-Disposition </b> with the file name and extension.
    For info on how to use this mail package, take a look at this blog too,
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Regards,
    Bhavesh

  • IPhoto changing file extension...

    I use a very old version of Photoshop (Adobe PS CS Version 8) for digital scrapbooking.  I store all of my files on an EHD because I have thousands, and I don't want to slow down my computer's performance.  It had been hooked up to my desktop, but I recently started attaching it to my MacBook because that has become my main computer.  When I hooked it up, I had to update my iPhoto libraries to work with my MacBook's version of iPhoto ('11).  So I did.  Now when I try to open my files, I get the error message that an invalid JPEG marker type is found.  Most of the files, aren't even jpegs, they are pngs or psds.
    It appears that when I try to open a file, iPhoto is duplicating it and giving it a jpeg extension, which is unreadable by Photoshop.  Is there any way to stop this from happening?  If not, can I undo what I've done and reattach it to my old computer?  I'm talking THOUSANDS of files!
    Thanks for any/all of your help!
    -J

    Are you running a Managed or a Referenced Library?
    A Managed Library, is the default setting, and iPhoto copies files into the iPhoto Library when Importing. The files are then stored in the Library package
    A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management.
    Regards
    TD

Maybe you are looking for