Convert a filetype to its original state - file-type

How can I change a file type?
A year ago I wrote a few articles that should be viewed in any text type of program. however, I recently opened them and they are viewed in symbols and alphanumeric characters. In linux os, the 'file' is now in an archived folder type that contains .xml files. in windows os it is 'file' as type of file. it has no extension.
Is there any way to recover the original readable alpha-numeric information in these files?
My preference would be to salvage the original information than redo.

First off the extension doesn't actually mean anything for the information of the file, it's only purpose is as a hint to the OS for deciding which application should be used in opening the file. You can prove this by renaming something like an exe to have a txt extension which will then open in notepad as a lot of seemingly random characters; renaming it back to exe will allow it to run again.
Based on your description the files you mention are some form of binary file, the bad news with that is you need to know either what application was used to create the file in order to be able to open it or what the original file extension was (which would be a hint to the former).
If you don't know either of those pieces of information you can of course use trial and error by guessing what extension it might be, renaming it, then opening it with the associated application and seeing if it worked.

Related

need to recover trados project with translation

I was working on a language translation project in trados on a virtual machine. Half of the work was done and the translated words were exported into a Word docx file. Upon restarting the virtul machine, the project file appears to have been corrupted as trados shows no signs that the project was worked on. When I manually open the sdlproj (trados project) file, trados cannot open the file mentioning the following:
: An error occured whilst trying to determine the file version
I have tried creating a new project and used pre-translate using batch tasks but that did not seem to have imported the previously translated document. I need to figure out how to recover my project so that I can recover the translated document (so I do not have to redo the work) as well as recover the translation memory for trados. The translation memory folder is present inside the original project folder. I would really appreciate any suggestion to further troubleshoot and fix this issue. I have tried their support desk but they do not appear to be available today. Two solutions I observed from their forum suggested:
save the project file with a zip extension, extract the contents and then open the sdlxiff file from there
recreate the project and use pre-translate.
In my case, I was able to open the sdlxiff file from the translated language directory. This opened the project with the text that had previously been translated. I am not certain whether I need to remove the sdlproj file or simply save the project hoping that it will overwrite the corrupted file. In either case, I will update this post once I get an answer to that.

Is there a way to find file type?

I would like to get the type of a file without using the extension, is there a way to use the metadata of a file to distinguish if it is a video file or if it isnt?
I have tried using extensions but I find searching each file extension and comparing it with a list of extensions is quite time consuming.
Yes it is possible to determine file type without using the file extension. You can do this by reading the file header also sometimes referred as file signature which occupies first few bytes of the file.
How many bytes do file header/signature occupy? This depends from file type to file type. So you should check the internet for more detailed information about the file header/signature for specific file type you want to identify.
You can find list of some more popular signatures List of file signatures - Wikipedia
PS: Most program stopped relying only on file signatures for determining file way back when first Windows came out. The main reason for this was the fact that since in the beginning file extensions were limited to three character length (limit of the old file systems like old FAT8 or FAT16) world quickly ran out of possible file extensions so multiple programs began to use same file extensions but used completely different file types. So by storing file header/signature at the beginning of the file you would no longer be limited by this file system limitation.

weird encoding in ios executable file of an app

I'm trying to see how does certain ios apps executable files look like, what i do is export the app files to my computer using iexplorer, i then took a look at the info.plist to see the executable files, after that i opened them with my notepad to use the UTF - 8 Encoding, but here how does things look like in both files-in the opening of both of the files i see english words that are expressing directories:
sample of file 1:
‹"Ò.(?!ÑNÓU£C°îXjøe”Ú5O•½°{^ÿÝŒEÌrôðæ$#[3,ÔÜ£æ»8I˜hGw!*aHÒQ•tœl²þ„™AÍçßÍ憴³)è:cÌ7H5æß-eFç¯î&Ø\n,$Ë$y»¥ÁB^6ÙP; i(q,AÅ
âðð·'©=Ÿa"v!PBÛÚ"¤¬‹Wj·;ËsÌŽÚâZüŠ–ÇüÉ;ÜA´sI«¸Üæ¿÷ ›‚‰.êøLž
sample of file 2:
ßꪧgö«húDªÝn¡±CÅÁ¹ â=؉ˆ4|®b¡ JeW-ɯðó¦xgýgeéÀXœH7ßJÉ" 3‡rÜ6ÒI_ ƒr cdÅá¸|íð¼l;Töl±”›MÛ˜±o/ôÇô#¬RS;Y¥!ÜzGò“vî©6ØR¡‚>Ì0m5
ŸzrPÐiDMÊ|Þ·9âëYß,p؃‹£x—.àN5îüÝrjœG]Æ·
ironically in the second file i can see a huge block of english words absolutely fine, but i dont get it why i don't see the whole file very good? i have also tried to open the files in an objective-c compiler after i have made them .m but that again was useless???
The executable files contain machine langage (binary) and cannot easily be read or understand by human. The word you still see in english are probably comments left by compiler that are not executed.
Trying to open those files in a compiler won't work because if the compiler role is to convert objective-c in machine langage, he's not able to convert the other way. For a same set of machine instructions, there are many ways to code it in objective-c.
The only way to get a source-code from a binary executable is to do some retro-engineering. It is done by converting the binary executable in assembly langage (it's a very low level langage but with understandable syntax) and then trying to reproduce the instructions with a higher-level langage such as objective-C.

Unconcatenating files

I have a corrupted 7-zip archive that I am extracting manually using the method outlined by Igor Pavlov at this link. An intermediate result is a large file that is a bunch of files cat'ed together that must be separated manually. I understand that some file formats will need to be extracted manually by a human using discretion (text files, etc.) but many file formats encode the size of the file as part of the file itself (e.g. .zip). Furthermore, some files can be parsed and their size can be deduced with just a little information about the file format (e.g. .pdf). Let's say the large file consists of the following files concatenated together:
Key: <filename>(<contents>)
badfile(aaaaaaaaaaabbbbbbbbbcccccccdddddddd) -> zip1.zip(aaaaaaaaaaa)
badfile2(bbbbbbbbbcccccccdddddddd)
I am looking for a program that I can run on a large file (call it badfile) that can determine the type and size of the first logical file (let's say it's a .zip file) contained within and create a new file to hold the contents (e.g. zip1.zip since filenames are lost) and chop the file off the front of badfile. This would allow me to run the program in a loop to extract files with known types and/or pause and let the user handle the difficult cases. Does such a program exist? I know that the *nix command file(1) will do a lot of the work here, but there would be a lot of effort in encoding rules for sizing files (e.g. .pdf) that I would prefer to not duplicate.
I believe this question should be closed due to being off topic as it asks to find existing programs to solve the problem, but open bounty prevents close vote. However.
Does such a program exist?
Yes they exist is and are called data carving tools.
Some commom ones include scalpel and foremost and PhotoRec
A list of other tools is avaliable here

Bundle creator OS Type code ??? in Xcode 4

I just realized that Bundle Creator OS Type code in my iOS app's Info.plist value is ????? in Xcode 4. What is the value supposed to be?
It's used to identify your application. You don't have to change it for an iPhone application.
Take a look at these links:
Information Property List Key Reference
Mac Creator and File Type Codes
Data Type Registration
It's not really used anymore.
It's a holdover from the Classic Mac OS days
when it was a datapoint used mainly to determine what apps could create or edit or read file types.
Back then you had to register them with Apple.
I don't think they even provide that service any more.
OS X and some apps might still use it in rare cases under the hood but its very legacy.
As you can imagine, the severely limited possible permutations made it untenable long term.
UTIs are the preferred approach now. The system then uses a combination of these and file extensions and magic numbers. Though on ios that may not be true as much as OSX.
It is just the four letter code to identify the bunder creator... for example for apple it is APPL...
It can be ???? or if your app name is "myApp" you can give "MYAP"... If you have many apps you can give first 2 characters with your app name and next 2 characters with company name...
For example apple uses CF for core foundation, AV etc
http://developer.apple.com/library/ios/#documentation/general/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
Just to give the historical perspective on extensions and file type and creator codes.
File extensions were part of the file system in CP/M and were intended to function something like what file types and creator codes actually did in MacOS. At the time, it was expected that each application would use a unique extension and only the one application would ever edit its own files. In the file system, the file name and extension were stored in two different areas, so the extension was not part of the name. Remember, at that time most systems had only a few applications, and file contents were specific to an application. They were never intended to be visible to end users, but due to an error in the directory command in CP/M, they were shown displayed as if they were part of the file name. MS-DOS picked up the convention, and the rest, unfortunately is history.
Apple's initial file system design saw the shortcomings of the extension concept, the primary one being that some file types were likely to be used by more than one application and with standardization of file formats, having more than one application that could operate on a file would be common. Therefore Apple split the file creator - the app that created the file - from the file type. By default if a file was double clicked, the originally creating application would open it. However, if a user did a file open from within an application, then all compatible files were supposed to be listed, even if that app was not the creator. Also, it would be possible to list all the applications that could open a file. Semantically, as intended in CP/M, the type and creator codes were separate from the file name itself.
Developers that properly registered their applications with Apple got their own creator codes. The problems with this concept came about from two sources: 1. Developers that hijacked other's or Apples own creator codes. 2. Unix systems, which never had a formal filename extension (all file names were a single string) began adopting the convention to end the file name with a dot and some additional letters to indicate file type. In the Unix convention, the extension is part of the file name itself, unlike CP/M and MS-DOS.

Resources