FIND YOUR NEXT FEW LINES

Results for “filename”

Small, practical examples. Search by task or narrow things down below.

35 snippets foundClear filters
C#File operations & paths

Move a file to a new filename

C#: File.Move changes the file path without loading its contents.

C#✓ Tested
Linux CommandsFinding & selecting files

Pass filenames with spaces through xargs

Linux Commands: Use null delimiters end to end instead of splitting filenames on whitespace.

Linux Commands✓ Tested
Bash ScriptsDiagnostics & defensive scripting

Prevent a variable value from expanding as a filename pattern

Bash Scripts: Quote a variable to pass its literal contents even when matching filenames exist.

Bash Scripts✓ Tested
C++Files & paths

Read a filename extension

Extract the final extension from a C++ filesystem path.

C++✓ Tested
C#File operations & paths

Read a filename stem and extension

C#: Use Path helpers instead of splitting a path on dots or directory separators.

C#✓ Tested
Bash ScriptsInput streams & redirection

Read null-delimited filenames into an array

Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.

Bash Scripts✓ Tested
Linux CommandsGetting Started

Read the filename portion of a path

Linux Commands: Read the filename portion of a path using GNU/Linux commands in an empty practice directory.

Linux Commands✓ Tested
Bash ScriptsVariables & text

Remove a filename extension

Keep the path while removing its final extension.

filename✓ Tested
GoFiles & paths

Separate a filename extension

Separate a filename extension using a complete Go program with explicit sample inputs.

Go✓ Tested
PowerShellFiles & paths

Build a portable file path

Combine directory and filename using the platform separator.

Join-Path✓ Tested
PowerShellStrings & literal text

Check a suffix without case sensitivity

PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.

PowerShell✓ Tested
C#Text validation & encoding

Check an extension without case sensitivity

C#: Use an explicit ordinal case-insensitive comparison for a known filename suffix.

C#✓ Tested