saving a text file

  • Thread starter Thread starter ms shakeel
  • Start date Start date
M

ms shakeel

hello sir,
thanks in advance for help.

i have a text file with the name abc.txt place at a
filepath say path1 and i want to make copy of this text
file abc.txt placed in path1,
i want to make the copy of of abc.txt in a path2 with the
name of text file as xyz.txt
that is basically i want to save/move the text file
abc.txt at path1 To xyz.txt at path2.
i want to do this from VBA
how do i achieve this

plz help me
thank you
ms shakeel
(e-mail address removed)
 
ms shakeel said:
hello sir,
thanks in advance for help.

i have a text file with the name abc.txt place at a
filepath say path1 and i want to make copy of this text
file abc.txt placed in path1,
i want to make the copy of of abc.txt in a path2 with the
name of text file as xyz.txt
that is basically i want to save/move the text file
abc.txt at path1 To xyz.txt at path2.
i want to do this from VBA
how do i achieve this

plz help me
thank you
ms shakeel
(e-mail address removed)

To copy the file, leaving the original in place:

FileCopy "path1\abc.txt", "path2\xyz.txt"

To move the file and rename it, so that the original is gone:

Name "path1\abc.txt" As "path2\xyz.txt"
 
Back
Top