Results for “filename”
Small, practical examples. Search by task or narrow things down below.
Move a file to a new filename
C#: File.Move changes the file path without loading its contents.
C#✓ Tested
Pass filenames with spaces through xargs
Linux Commands: Use null delimiters end to end instead of splitting filenames on whitespace.
Linux Commands✓ Tested
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
Read a filename extension
Extract the final extension from a C++ filesystem path.
C++✓ Tested
Read a filename stem and extension
C#: Use Path helpers instead of splitting a path on dots or directory separators.
C#✓ Tested
Read null-delimited filenames into an array
Bash Scripts: A null delimiter preserves spaces and embedded newlines in filenames.
Bash Scripts✓ Tested
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
Remove a filename extension
Keep the path while removing its final extension.
filename✓ Tested
Separate a filename extension
Separate a filename extension using a complete Go program with explicit sample inputs.
Go✓ Tested
Build a portable file path
Combine directory and filename using the platform separator.
Join-Path✓ Tested
Check a suffix without case sensitivity
PowerShell: Use an ordinal case-insensitive comparison for a known filename extension.
PowerShell✓ Tested
Check an extension without case sensitivity
C#: Use an explicit ordinal case-insensitive comparison for a known filename suffix.
C#✓ Tested