Re: Moving files with large file names into Recycle Bin
- From: "Mythran" <kip_potter@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 12 Jun 2006 15:21:46 -0700
<avalain@xxxxxxxxx> wrote in message news:1150149360.093163.193280@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Oop, so I figured it out! One thing that I hadn't seen on these posts
before is that a null character is required at the end of the file
name. So I had to do this:
shf.pFrom = @"c:\testerfiles.jpg" + "\0";
Hopefully this helps someone in the future.
aval...@xxxxxxxxx wrote:Hi, I am trying to delete files programmatically and put them in the
Recycle Bin. I am using SHFileOperation and everything works fine,
except when I try to delete files with more than 10 characters in the
name (not including the extension). So if the file is named
"testerfile.jpg" it will work. If the file is named "testerfiles.jpg"
it will not. However, if the file is named "testerfiles.jpg" and I try
to delete "tester~1.jpg", it will work as well. This looks like how
MS-DOS used to work, except with 10 characters instead of 8.
Is there any chance there is a flag or something that needs to be set?
I am currently using FOF_ALLOWUNDO and FOF_NOCONFIRMATION flags. Any
help in this would be greatly appreciated. Thanks!
hmm....could just do "C:\\testerfiles.jpg\0"; :)
Mythran
.
- References:
- Moving files with large file names into Recycle Bin
- From: avalain
- Re: Moving files with large file names into Recycle Bin
- From: avalain
- Moving files with large file names into Recycle Bin
- Prev by Date: Re: alternatives to unboxing..
- Next by Date: Re: Dump SQL Server database to XML through C#
- Previous by thread: Re: Moving files with large file names into Recycle Bin
- Next by thread: Asynch Sockets over UDP: How do you Know when a socket dissconnects
- Index(es):
Relevant Pages
|