90

Yes, it might actually make sense if you are being forced to change formats. If you have a file with 95kbps in a highly efficient format, to retain the same quality, a relatively inefficient format as mp3 needs a higher bitrate. Of course you will never get anything back that was lost in the first place. On the contrary, encoding as mp3 will reduce the ...


67

Use Ftype & Assoc to fix this (and it is scriptable). Use Assoc to get the filetype >Assoc .txt gives you: .txt = txtfile Then >Ftype txtfile=C:\Program Files (x86)\Notepad++\notepad++.exe %1 Once you know the file type you can use Ftype to associate it with an action. This would work for .php files (just plop them in a batch file) ...


51

Ahh, the dark arts of file identification. I rather like trid for this. It identifies files (and renames them, if you choose), has a nice large database, and is totally independent of the file itself, so you have two approaches at your disposal.


49

In the general case this will not usually result in higher quality audio. The basic reason being that you cannot manufacture sounds that aren't there in the original file. In the best case the only result will be, as you suggest, larger files. In the worst case the files could even be of worse quality as the second lossy encoder is tying to encode the ...


44

You should do the following: Select a Ruby file. Get info (right click or [CMD] + [I]). Select your text editor under the Open with panel. Click Change all.


29

This batch script will do it. @echo off set target=%~1 if "%target%"=="" set target=%cd% setlocal EnableDelayedExpansion set LF=^ rem Previous two lines deliberately left blank for LF to work. for /f "tokens=*" %%i in ('dir /b /s /a:-d "%target%"') do ( set ext=%%~xi if "!ext!"=="" set ext=FileWithNoExtension echo !extlist! | find "!ext!:" &...


26

The usual way to do this in bash is to use parameter expansion. (See the bash man page and search for "Parameter Expansion".) a=${1%.*} The % indicates that everything matching the pattern following (.*) from the right, using the shortest match possible, is to be deleted from the parameter $1. In this case, you don't need double-quotes (") around the ...


25

Windows Vista and higher support the Advanced Query Syntax (AQS). To search for files with a particular file extension (.doc), you'd type: ext:.doc or simply: *.doc (the 1st one is better - it's well worth learning AQS) To find exact matches, enclose the extension in double quotes: ext: ".cs" AQS References Advanced Query Syntax (Windows) ...


24

The only real way to change this via GUI is to click Hide extension in the Finder Info window. Checking this changes the com.apple.FinderInfo extended attribute, which you normally can't edit – at least not easily. We can however use a tool to do it for us. For the below to work, you obviously need to have Show all file extensions unchecked in Finder's ...


21

In short: you make your own file extension by applying whatever letters you want to the end of the file name. You run it by telling your OS what program should be called when you double-click on it. Full explanation: A file extension is actually just the letters after the file, there is nothing magical about the extension. A lot of files I have made when I'...


20

Although not strictly meeting the requirement for a batch script, I have used a single-line powershell script: Get-Childitem C:\MyDirectory -Recurse | WHERE { -NOT $_.PSIsContainer } | Group Extension -NoElement | Sort Count -Desc > FileExtensions.txt You could potentially run it from the command line/batch file: Powershell -Command "& Get-...


18

New style save dialog has to be set to disabled for file extension suffix to work. Menu » Settings » Preferences "Default Directory" tab Uncheck "Use new style save dialog (without file extension feature)"


16

Windows' file access is (generally) not case sensitive. Most Windows programs should not care. Most likely, the two 'different' extensions are from different sources, and the source of the .JPG files has them in an odd/corrupted format. For example, you have two cameras. One names its files .JPG, the other names them .jpg. The files coming from the first ...


14

Is there a way to open a file with the default program using command-line instead? This is a job for xdg-open: xdg-open opens a file or URL in the user's preferred application. If a URL is provided the URL will be opened in the user's preferred web browser. If a file is provided the file will be opened in the preferred application for files of that type. ...


13

According to MSDN, the nothing character is []. So press F3 and enter ext:[].


13

If you want to remove an extension in Bash, you can do this without external tools. Then, pass it to basename: $ f=/path/to/some/file.foo.bar $ basename "${f%.*}" file.foo With a mixed-case extension: $ f=/path/to/some/file.foo.Bar $ basename "${f%.*}" file.foo Here, % is string manipulation. It will remove the shortest matching substring from the back ...


13

The data vim showed you when you opened the binary file contained the string eLecta, which points me to eLecta, a virtual classroom software. Since the software is commercial, your teacher should have supplied you with a player embedded in some web-site rather than a standalone download. It uses Java to play the file. Otherwise you can maybe try installing ...


12

Normally, .sig is used for detached signatures using the binary OpenPGP format, and .asc for when the contents are ASCII-armored. For everything else, .gpg is common for the binary format, .asc when armored.


12

I found an answer that fixed this for me (versions 7.3.2, 7.3.3. and 7.4.2) Settings->Preferences->Default Directory->uncheck Use new style save dialog… (Source) Posted by (Claudia Frank)


11

There is also FileID which uses magicdb http://www.optimasc.com/products/fileid/index.html Explanation: FileID, TrID and File all work with magic numbers contained in the file which are supposed to be unique for each filetype, so all three programs are more or less equivalent. TrID is the most practical for windows users, while GNU/Linux ones simply use ...


11

Follow these directions to edit the Registry and assign the Windows Text Preview Handler to the .js file extension. (Based on this How To Geek article.) Open Registry Editor Navigate to HKEY_CLASSES_ROOT\.js and make note of the content of the (Default) value. This is the ProgID to which the .js extension is registered: Navigate to the ProgID's key. We'll ...


11

No, temporary file handling is entirely determined by the application that manages the files; there are no rules or even conventions across apps.


9

Even easier method that I found, it just requires the command line. Open a command prompt with Administrator privileges (right click > Run as Administrator). Run the command assoc .<file_extension> in the prompt. This will give the file type which is associated with the extension. If this command returns File association not found for extension .<...


8

Just need to open a bash terminal and run: ls *.py[co] >> .hidden bingo!


8

You can try the file command for Windows http://gnuwin32.sourceforge.net/packages/file.htm


8

Start mc, click on Command and then on edit extension file (or F9, c, e). Then, for example, search (F7) for pdf and change <------->Open=(xpdf %f &) into <------->Open=(open %f &) How exit and save (F10). Changes are immediately applied. open Starts Preview by default. Repeat this for all extensions you want te re-bind. As long ...


8

El8 can be played online only. Please ask your teacher to give you a playable link instead of a file.


8

On Windows, a "folder" is a container of "files". They are two different things and one cannot be changed into the other, especially not by just adding .TXT to the name. :) More info: Definition of: files vs. folders is there some keyboard shortcut that could help me to create a file? See this other SU question: Is there a shortcut for creating a new ...


7

Using an AutoIt script, the following should perform what you want: $FIREWORKS = "C:/Program Files/Fireworks.exe" $NORMALVWR = "C:/WindowsPictureViewer.exe" If $CmdLine[0] > 0 Then $toRun = "" $fExt = StringRight($CmdLine[1], 7) ; First, we set $toRun as the proper target program to run. If StringLen($CmdLine[1]) >= 7 ...


Only top voted, non community-wiki answers of a minimum length are eligible