file-extension Questions

12

Solved

I have a directory full of files with one extension (.txt in this case) that I want to automatically convert to another extension (.md). Is there an easy terminal one-liner I can use to convert al...
Coady asked 15/2, 2013 at 1:55

12

Solved

Is there an option to restrict git diff to a given set of file extensions?
Bashaw asked 18/12, 2011 at 21:1

19

Solved

On a Linux machine I would like to traverse a folder hierarchy and get a list of all of the distinct file extensions within it. What would be the best way to achieve this from a shell?
Hess asked 3/12, 2009 at 19:18

10

Solved

I have a folder with a lot of stuff and I would like just to commit ".c" extension files. Is there a command to do this or do I need to add each file name manually?
Lenka asked 31/10, 2014 at 20:16

4

Solved

I know that, if I wanted to grep for a pattern only on files with certain extensions, I could do this: // searches recursively and matches case insensitively in only javascript files // for "res" ...
Versicle asked 13/12, 2012 at 20:13

4

Solved

I know that, if I wanted to grep for a pattern only on files with certain extensions, I could do this: // searches recursively and matches case insensitively in only javascript files // for "res" ...
Devious asked 13/12, 2012 at 20:13

2

Solved

public string ContructOrganizationNameLogo(HttpPostedFileBase upload, string OrganizationName, int OrganizationID,string LangName) { var UploadedfileName = Path.GetFileName(upload.FileName); str...
Zulazulch asked 28/5, 2010 at 13:46

9

Solved

I need to programatically distinguish between Jinja template files, other template files (such as ERB), and template-less plain text files. According to Jinja documentation: A Jinja template do...
Exurbanite asked 12/4, 2015 at 15:8

4

Solved

Can I tell Visual Studio how treat a file with a custom file extension? I want to be able to open a file with ".xxx" extension in Visual Studio and have CSS highlighting. I've tried to do it by g...
Cockhorse asked 16/8, 2010 at 13:43

12

Solved

I'm trying to lower-case all my extensions regardless of what it is. So far, from what I've seen, you have to specify what file extensions you want to convert to lower-case. However, I just want to...
Legion asked 5/8, 2012 at 17:11

6

Solved

How can you get the file extension of a base64 encoded string in PHP? In my case, this file happens to be an image: $base64_encoded_string = $_POST['image_base64_string']; $extension = ?? How ...
Crispate asked 23/9, 2018 at 4:10

32

Solved

This is a question you can read everywhere on the web with various answers: $ext = end(explode('.', $filename)); $ext = substr(strrchr($filename, '.'), 1); $ext = substr($filename, strrpos($filenam...
Crosley asked 6/10, 2008 at 11:0

5

Solved

Question I have is, does Ruby on Rails have a function similar to: file_content_type = MIME::Types.type_for(file).first.content_type that will return the file extension or postfix for a specific...
Allayne asked 28/5, 2013 at 23:57

17

Solved

I'd like to find all *.html files in src folder and all its sub folders using nodejs. What is the best way to do it? var folder = '/project1/src'; var extension = 'html'; var cb = function(err, r...
Cleary asked 23/8, 2014 at 9:38

4

Solved

I am splitting file names in Go to get at the file extension (e.g. import ("strings") ; strings.Split("example.txt", ".")). For this reason, I would like to return the...
Aludel asked 12/5, 2018 at 22:35

9

Solved

I have seen .gnu, .plt, and .gplot as file extensions for gnuplot scripts. I know Linux doesn't care about file extensions, but what extension most universally declares to human beings "I am a gnu...
Sally asked 31/3, 2011 at 9:42

10

Solved

I have a base64 encoded image returned from a service and it looks like this: /9j/4AAQSkZJRgABAQEASABIAAD/4Yp2aHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wLwA8P3hwYWNrZXQgYmVnaW49Iu+7vyIgaWQ9Ilc1TTBNcENlaG...
Mixie asked 11/1, 2015 at 11:47

33

Solved

Is there a function to extract the extension from a filename?
Caseate asked 12/2, 2009 at 14:11

18

Solved

On GitHub, several projects have README.md files. It seems like a simple format file to express text and pictures. I guess there is an editor or syntax explanation somewhere. Where can I find an...
Arethaarethusa asked 7/5, 2011 at 17:42

14

Solved

I'm working on a certain program where I need to do different things depending on the extension of the file. Could I just use this? if m == *.mp3 ... elif m == *.flac ...
Disparage asked 5/5, 2011 at 14:34

11

Solved

I am a newbie. I have an EditText and a Browse Button to explore Folders and select files only. From the Browse Button, when a file is clicked it stores the folder path in which that file is in one...
Applied asked 21/6, 2016 at 18:23

7

I'm trying in php to move a folder but keep both files in the dest folder if exist duplicate. i tried todo that in recursion but its too complicated so many things can go wrong for example file pre...
Zaller asked 20/3, 2013 at 16:51

14

Solved

In my web application (asp.net,c#) I am uploading video file in a page but I want to upload only flv videos. How can I restrict when I upload other extension videos?
Mach asked 11/12, 2009 at 9:30

7

Solved

I want to get the extension from a MimeType. For example: video/mp4 ----> mp4 application/x-rar-compressed ----> rar text/plain ----> txt application/pdf ----> pdf To save my file on W...
Ludly asked 1/1, 2018 at 20:47

7

Solved

I tried to save file with .env file extension but I could not see any .env file extension in save as dropdown option. I also tried to rename it as .env but it gets saved as text file (see screensh...
Obeng asked 13/2, 2018 at 15:51

© 2022 - 2024 — McMap. All rights reserved.