Rename files longer than MAX_PATH using WIN32 API (VBA)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • leoce7
    New Member
    • Aug 2008
    • 8

    #1

    Rename files longer than MAX_PATH using WIN32 API (VBA)

    I need some help renaming a file that has a full path length longer than MAX_PATH (>260). I can locate the files using WIN32 API ("\\?\" recognition for long paths, etc.) coding and have actually developed a workaround using the Dir commands as a secondary route with appropriate error trapping as well. My problem simply is that I have located the file but now need to rename it. Neither the "Name" statement nor FSO's .movefile attempts were successful either (even with "\\?\" prepended). Please help!!!
  • vdraceil
    New Member
    • Jul 2007
    • 236

    #2
    if you can locate the file,then your task goes easier..
    with FSO try copying the file to the same location but with a different name and then delete the original file.
    this is equal to renaming a file..

    by the way can you just tell me how you to use WIN32 Api to locate files with a very long path?

    Comment

    Working...