Re: File Version without GetFileVersionInfo



On Tue, 21 Jun 2005 21:10:51 -0700, Alexander Grigoriev wrote:

> I think in NT+ OS you cannot rename a file if it's open without
> FILE_SHARE_DELETE flag. Mapped executables and DLLs are opened without it.
> It worked in Win9x, IIRC.

I tried it earlier today in WinXP. I wrote a console program that printed
its filename from GetModuleFileName(), slept for 20 sec giving me time to
rename the file in Explorer, and again printed its filename from
GetModuleFileName(). The rename was successful, but GetModuleFileName
didn't notice. :(

--
Doug Harrison
Microsoft MVP - Visual C++
.



Relevant Pages

  • Re: Changing Uppercase filenames into Lowercase
    ... > I already found MAKEUP.COM which breaks down a filename ... > uses the RENAME command to rename lowercase names and ... > lowercase filename. ... > The filename remains uppercase because DCL uppercases ...
    (comp.os.vms)
  • Re: Renaming files using wildcards
    ... When I strip down the filenames of their ... spaces, the rename works well. ... strip the filename of it's spaces, ... rename command can't find the file name to rename when it ...
    (microsoft.public.windowsxp.general)
  • Re: remove words from mutiple files
    ... could edit those text files running Windows. ... That would be a good use for the rename feature if its in Ubuntu. ... # Checks if filename already lowercase. ...
    (alt.linux)
  • Re: Cannot delete file with long name
    ... Completely ignores attempts to rename. ... Did find a utility which is able to display the short filename and delete ... Explorer shell to crash. ... I can delete the problem files by deleting the entire folder they are ...
    (microsoft.public.windowsxp.general)
  • Re: media player 10
    ... rename your media library. ... I have XP and all I did was to copy the filename ... If nothing happens soon I'll just switch media players! ...
    (microsoft.public.windowsmedia.player)