Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default API code for 'Renaming a Directory'

I have not found a command in VBA to rename a directory in Windows Explorer.
Does anyone know the API code for renaming a directory?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default API code for 'Renaming a Directory'

Using File System Object...

Set objFSO = CreateObject("Scripting.FileSystemObject")
objFSO.MoveFolder "C:\temp1" , "C:\temp2"

If this post helps click Yes
---------------
Jacob Skaria


"Joakim Norrman" wrote:

I have not found a command in VBA to rename a directory in Windows Explorer.
Does anyone know the API code for renaming a directory?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default API code for 'Renaming a Directory'

See the Name function in VBA help

Name sOldPath As sNewPath

Regards,
Peter T

"Joakim Norrman" wrote in message
...
I have not found a command in VBA to rename a directory in Windows
Explorer.
Does anyone know the API code for renaming a directory?



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Renaming jpgs in a directory using names in excel spreadsheet Tobey Excel Programming 2 July 14th 08 05:29 PM
Renaming files in a directory nospaminlich Excel Programming 2 December 26th 07 10:57 PM
Renaming files in a directory Candyman Excel Programming 2 December 7th 05 07:16 PM
Renaming adding and deleting directory alanford Excel Programming 2 February 16th 05 11:08 AM
Renaming all files in a directory Jan Kronsell[_3_] Excel Programming 4 February 19th 04 12:33 PM


All times are GMT +1. The time now is 07:07 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"