Re: Moving files with large file names into Recycle Bin




<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

.



Relevant Pages

  • Re: Data logger using HP48GX
    ... this Computer Serial Temperature Meter & Data Logger, the output data is a continuous ... Use BUFLEN to see how many characters are in the 48 buffer, ... then DROP to get rid of the "result" flag in Level 1, ...
    (comp.sys.hp48)
  • Re: GetCharacterPlacement() problems
    ... > incorrectly and returning a small number of characters able to be fit into the available space when there's space for plenty more. ... GetCharaterPlacement() twice, the first with the GCP_MAXEXTENT flag only with FLI_GLYPHS ... and GCP_USEKERNING masked off) to get the number of characters of the string that could be displayed on the line. ...
    (microsoft.public.win32.programmer.gdi)
  • Re: Limiting characters in a text field
    ... up a "rules of use" guide for all users of Project in your organization. ... In addition to just limiting the number of characters in text fields, ... control (i.e. TaskChange event macro). ... Set up a formula in a spare flag ...
    (microsoft.public.project)
  • Re: Writing a byte to a specific location in a file
    ... what kind of file it is, then encode the characters according to this. ... The preamble for an UTF8 file is the three bytes EF BB BF. ... The first character is a flag indicating the file has changed and the 2 - ... Below is a sub that I am using to try and update the first flag. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Line Method Explanation?
    ... > just the Line method's syntax in comparison to the standard syntax of all ... > a) Where is the Required flag? ... > BF tells the line method you want a Filled In rectangle/Box). ... > characters are either a variable, a constant, or you put quotation marks ...
    (microsoft.public.access.reports)