Rename file using AlphaFS

Oct 31, 2014 at 12:38 PM
Hi,

is possible rename file using AlphaFS?

for example:

originalFile: v:\folder\morethen260character.txt
RenamedFiles: v:\folder\lessthen260character.txt

i tried [Alphaleonis.Win32.Filesystem.File]::Replace($originalFile, $RenamedFiles) but it didn't work.

thx for help,

regards,

Vladimír
Developer
Oct 31, 2014 at 12:54 PM
Edited Oct 31, 2014 at 1:13 PM
Replace: Replaces the contents of a specified file with the contents of another file.

You can use File.Move() to rename a file.
Marked as answer by Yomodo on 11/2/2014 at 6:25 AM