[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now


Rename a text file with VBA or a macro in access

Posted on 2006-11-08
Medium Priority
Last Modified: 2012-06-27
How can I use MS Access to rename a file in another folder?

I have a file...  c:\test\file.txt
I want to use Access to rename it (like the ren function in DOS) to c:\test\NEW.txt

How can I do this? Can I do this? Will Britney ever find love again?
Question by:niner
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
LVL 33

Accepted Solution

hongjun earned 200 total points
ID: 17899306
You can do this

FileCopy C:\test\file.txt, C:\test\NEW.txt
Kill C:\test\file.txt

Author Comment

ID: 17899373
How/where, in VBA?
LVL 33

Expert Comment

ID: 17899386
Yes. in VBA

Expert Comment

ID: 17899410
That's pure VBSCRIPT, you can do as HonJun says .

Best Regards,

Paulo Condeça.

Author Comment

ID: 17899445
Ah, I got it. Can this be extrapolated to like *.txt or does the first filename need to be explicit?

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article shows the steps required to install WordPress on Azure. Web Apps, Mobile Apps, API Apps, or Functions, in Azure all these run in an App Service plan. WordPress is no exception and requires an App Service Plan and Database to install
What we learned in Webroot's webinar on multi-vector protection.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question