excel - Copy files with auto rename -


i have 2 files static names , want use vba copy these files place, original names used, windows 7 shows options: copy , overwrite, don´t copy , copy rename original file.

is possible vba third option?

maybe help:

sub copyandrenameifexistselsecopy()  dim fname string, dname string fname = "c:\temp\folder1\one.txt" dname = "c:\temp\folder2\one.txt" rname = "c:\temp\folder2\one_renamed.txt" if dir(dname) <> ""     filecopy fname, rname else     filecopy fname, dname end if  end sub 

Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -