[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

rename-file gets "Invalid argument" on Windows 10

From: Steinar Bang
Subject: rename-file gets "Invalid argument" on Windows 10
Date: Fri, 11 Feb 2022 21:13:27 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (windows-nt)

Platform: Windows 10,
          GNU Emacs 27.2 (build 1, x86_64-w64-mingw32) of 2021-03-26

I get the following error
 Debugger entered--Lisp error: (file-error "Renaming" #("Invalid argument" 0 16 
(charset windows-1252)) "c:/Users/sb/News/nnimap+privat:INBOX.SCORE" 

when running this function:
 (rename-file "~/News/nnimap+privat:INBOX.SCORE" 
"~/News/nnimap+privat:INBOX.SCORE~" t)

Except for the directions of the slashes there is a file at the path

There is also a file at "c:/Users/sb/News/nnimap+privat:INBOX.SCORE~",
but the third t argument of rename-file should take care of that...?

Any ideas?

I have tried turning the slashes into backslashes (and doubling them),
but I get the same error (with forward slashes).

Are there any of the other characters in the file name that may cause
problems on the windows file system?  If so, is there a way to work
around them, given that I can't do anything about the file names?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]