Skip to main content

パス.フルパス→ファイル名(basename)

Python

py
os.path.basename(fullpath)

Bash

bash
basename $fullpath
${fullpath##/}

Ruby

rb
File.basename(fullpath)

PowerShell

powershell
Split-Path -Leaf fullpath

Excel

xlsx
=MID(SUBSTITUTE(A1,LEFT(A1,FIND(">",SUBSTITUTE(A1,"/",">",LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))),1)-1),""),2,LEN(A1))