Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Copying and renaming files on disk

From within VBA, I need to copy files from one directory to another, and
then change some of the file extensions.

Any hints to get me started?

Thanks,
Tim C


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Copying and renaming files on disk

sPath = "C:\MyDir1\"
sPath2 = "D:\MyFolder1\MyFolder2\"

Filcopy sPath & "myfile.xls", sPath2 & "Myfile.dat"

You can loop through the files using the code example for Dir
--
Regards,
Tom Ogilvy


Tim C wrote in message
...
From within VBA, I need to copy files from one directory to another, and
then change some of the file extensions.

Any hints to get me started?

Thanks,
Tim C




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Copying and renaming files on disk

Perfect! (except for the missing e : )

Thanks,
Tim C

"Tom Ogilvy" wrote in message
...
sPath = "C:\MyDir1\"
sPath2 = "D:\MyFolder1\MyFolder2\"

Filcopy sPath & "myfile.xls", sPath2 & "Myfile.dat"

You can loop through the files using the code example for Dir
--
Regards,
Tom Ogilvy


Tim C wrote in message
...
From within VBA, I need to copy files from one directory to another, and
then change some of the file extensions.

Any hints to get me started?

Thanks,
Tim C






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
Copying files from floppy to disk ljwag New Users to Excel 2 September 14th 07 05:34 AM
Download files from 3.5 disk in excel but system said disk need fo DG Excel Discussion (Misc queries) 0 August 13th 05 04:16 PM
Copying and renaming a file Craig Excel Discussion (Misc queries) 1 February 24th 05 10:47 PM
copying and renaming sheets Jan Eikeland Excel Programming 9 December 23rd 03 07:55 PM
Copying and renaming worksheets John Young Excel Programming 1 December 17th 03 01:46 AM


All times are GMT +1. The time now is 10:16 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"