filenames Questions

16

Solved

For some reason, I keep getting a '1' for the file names with this code: if (is_dir($log_directory)) { if ($handle = opendir($log_directory)) { while($file = readdir($handle) !== FALSE) { $re...
Corinthian asked 27/5, 2010 at 16:31

3

Solved

I use Serilog on a .NET Core application with RollingFile. I wonder, if there are different filename placeholders? I only know {Date}. For example, I have code like Log.Logger = new LoggerConfig...
Celestine asked 7/6, 2017 at 1:0

5

Solved

Will Path.GetRandomFileName generate a unique filename every single time? Also, what about Path.GetTempFileName - will that generate a unique name?
Andesine asked 10/2, 2014 at 18:5

5

Solved

Is there a way to change/set the filename on download? Example: Jon Smith uploaded his headshot, and the filename is 4321431-small.jpg. On download, I'd like to rename the file to jon_smith__heads...

6

Solved

I know that classes in Python are typically cased using camelCase. Is it also the normal convention to have the file that contains the class also be camelCase'd especially if the file only contain...
Macrocosm asked 9/2, 2017 at 3:12

8

Solved

I need to find every duplicate filenames in a given dir tree. I dont know, what dir tree user will give as a script argument, so I dont know the directory hierarchy. I tried this: #!/bin/sh find -...
Rawdan asked 29/4, 2013 at 10:40

29

Solved

In Java, given a java.net.URL or a String in the form of http://www.example.com/some/path/to/a/file.xml , what is the easiest way to get the file name, minus the extension? So, in this example, I'm...
Webfooted asked 3/3, 2009 at 9:24

3

Solved

I have some legacy code I am dealing with (so no I can't just use a URL with an encoded filename component) that allows a user to download a file from our website. Since our filenames are often in ...
Buttonwood asked 2/7, 2012 at 23:8

11

Solved

How do I do mv original.filename new.original.filename without retyping the original filename? I would imagine being able to do something like mv -p=new. original.filename or perhaps mv original.f...
Niobium asked 16/10, 2008 at 11:37

33

Solved

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

8

Solved

I have a folder "model" with files named like: a_EmployeeData a_TableData b_TestData b_TestModel I basically need to drop the underscore and make them: aEmployeeData aTableData bTestData bTestM...
Rozele asked 24/6, 2013 at 21:35

1

This is NOT a dupe of this question. This question is NOT about Windows. It's a general question across OSes. Is there an efficient way to get the correct case of a filename in node.js other than ...
Cosec asked 28/12, 2017 at 7:19

15

Solved

Given a string file path such as /foo/fizzbuzz.bar, how would I use bash to extract just the fizzbuzz portion of said string?
Belay asked 24/9, 2008 at 3:37

2

I know making .Rmd produce .html file or .md file should use the following codes --- title: "report" output: html_document --- or --- title: "report" output: md_document --- But how to produ...
Istanbul asked 5/1, 2017 at 11:1

8

Solved

I am trying to sync remote repo with local repo but getting following errors. Some files (which have not extention) are not getting sync with local repo on WINDOWS machine, but I could sync success...
Crispas asked 29/9, 2014 at 10:19

3

I would like to retrieve the font file path with its extension (for example "arial.ttf"). The QFont::rawname() method always returns "unknown". Is there another way to obtain the name and the ext...
Sihonn asked 30/9, 2013 at 15:46

2

Solved

I want to generate a wildcard string from a pair of file names. Kind of an inverse-glob. Example: file1 = 'some foo file.txt' file2 = 'some bar file.txt' assert 'some * file.txt' == inverse_glob(f...
Bufordbug asked 5/5, 2017 at 15:34

10

Solved

I downloaded a file as response of ajax. How to get the file name and file type from content-disposition and display thumbnail for it. I got many search results but couldn't find right way. $(&quot...
Trueblood asked 2/12, 2016 at 19:11

1

Solved

Is it possible to print the caller source file name calling a function defined in another file, without passing __FILE__ explicitly and without using preprocessor tricks? // Header.h #includ...
Dinnie asked 7/11, 2022 at 11:23

3

Solved

PowerShell doesn't seem to sort objects by name ascending correctly: dir | Sort-Object Name My goal is to sort the elements in this order: 1.sql 2.sql 3.sql ... 9.sql 10.sql 11.sql ... Is there ...
Nealneala asked 27/7, 2018 at 1:32

11

Solved

I would like to have files named for example: dd.mm.yyyy.log How is this possible with log4net?
Sialagogue asked 22/7, 2009 at 12:57

5

Solved

Looking for a regex/replace function to take a user inputted string say, "John Smith's Cool Page" and return a filename/url safe string like "john_smith_s_cool_page.html", or something to that exte...
Induna asked 13/12, 2011 at 6:5

6

I’m getting the following error in VSCode in my Angular 6 application: ERROR in src/app/providers/dynamic-data/dynamic-data.service.ts(5,26): error TS1149: File name '/Users/gibranshah/repos/eva/E...
Mohawk asked 9/1, 2019 at 16:52

15

Solved

I'm designing a database table which will hold filenames of uploaded files. What is the maximum length of a filename in NTFS as used by Windows XP or Vista?
Pacifism asked 5/11, 2008 at 16:39

8

Is there any way to list the files of a directory in a static webpage with the link to view the file? I would like to upload some PDF files to a certain directory of my static website (it uses HTM...
Horsa asked 9/1, 2015 at 12:23

© 2022 - 2025 — McMap. All rights reserved.