Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #343 Rename file

Rename the file at path1 into path2

File.rename(path1, path2) 
#include <stdio.h>
rename(path1, path2);
#include <filesystem>
std::filesystem::rename(path1, path2);
err := os.Rename(path1, path2)
SyUtils
if RenameFile(path1,path2) then writeln('Ok');
import os
os.rename(path1, path2)

New implementation...
< >
programming-idioms.org