Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
G3£Wh\)zZ@
 
Posts: n/a
Default Copy over files/replace (complete question)

Cat walked over keyboard and actually sent the previous post uncomplete so
here it is complete..thansk for reading.

I have a lot of files on cd/dvd that i am moving into one folder on my hdd
so i can sort them out before reburning them. However there are quiet a few
mp3 files that have the same name etc but because i converted these at a
higher bit rate they are larger in size, whilst moving them to the folder i
keep getting the "would i like to replace the existing file" and have to
click either yes or no.

Its a pain ...so is there anything out there or anything i can do , that
will only copy/replace the original file if the new file is larger in size..


--
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95
  #2   Report Post  
Mel Arquiza
 
Posts: n/a
Default

Option Explicit
Declare Function CopyFile Lib "kernel32" Alias "CopyFileA" (ByVal
lpExistingFileName As String, _
ByVal lpNewFileName As String, ByVal bFailIfExists As Long) As Long

Public Function APIFileCopy(src As String, dest As String, _
Optional FailIfDestExists As Boolean) As Boolean

'PURPOSE: COPY FILES
'PARAMETERS: src: Source File (FullPath)
'dest: Destination File (FullPath)
'FailIfDestExists (Optional):
'Set to true if you don't want to
'overwrite the destination file if
'it exists

'Returns (True if Successful, false otherwise)

'EXAMPLE:
'dim bSuccess as boolean
'bSuccess = APIFileCopy ("C:\MyFile.txt", "D:\MyFile.txt")

Dim lRet As Long
lRet = CopyFile(src, dest, FailIfDestExists)
APIFileCopy = (lRet 0)
End Function

Hope this helps.

"G3£Wh)zZ@" wrote:

Cat walked over keyboard and actually sent the previous post uncomplete so
here it is complete..thansk for reading.

I have a lot of files on cd/dvd that i am moving into one folder on my hdd
so i can sort them out before reburning them. However there are quiet a few
mp3 files that have the same name etc but because i converted these at a
higher bit rate they are larger in size, whilst moving them to the folder i
keep getting the "would i like to replace the existing file" and have to
click either yes or no.

Its a pain ...so is there anything out there or anything i can do , that
will only copy/replace the original file if the new file is larger in size..


--
The Source For Premium Newsgroup Access
Great Speed, Great Retention
1 GB/Day for only $8.95

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
Cannot copy from one workbook to another Michael Malinsky Excel Discussion (Misc queries) 4 May 10th 05 05:48 PM
Copy sheet to new workbook Tim Excel Discussion (Misc queries) 5 April 28th 05 02:00 PM
Copy worksheets with formulas between different workbooks Tim Excel Discussion (Misc queries) 3 March 31st 05 12:40 PM
Copy Function Genie Bohn Excel Discussion (Misc queries) 0 March 23rd 05 12:28 AM
Copy and pasting graphs to PowerPoint JZip Excel Discussion (Misc queries) 0 January 6th 05 08:29 PM


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