Advertisement

04.24.2008 at 02:23PM PDT, ID: 23352014
[x]
Attachment Details

How to rename file using batch file

Asked by kg6lfz in MS DOS

Tags: MS DOS

O/S:  Win2K / Access 2000
We receive text files every morning via e-mail attachments.  Number of files varies depending on the day.  Those attached files have all different file names.  We import those data files (.txt) into MS Access.   I created a macro from Access and it imports fine.  However, before I import files, I have to manually rename files, so that Access can find a file name specified in the macro.  (I tired to create a macro using *.txt as a file name, but it did not work.)
My question is - Is there any way, by running a batch file,  I can rename file names based on how many files exist in a folder?  For example, in a c:\file\, if there are 4 text files, I want to rename them to file1.txt, file2.txt, file3.txt and file4.txt.  In this way, I can specified file names, file1.txt, file2.txt, file3.txt and file4.txt, inside the Access  macro.
Your comments and advice are very appreciated.  Thank you very much in advance.  hbStart Free Trial
[+][-]04.24.2008 at 02:49PM PDT, ID: 21435489

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: MS DOS
Tags: MS DOS
Sign Up Now!
Solution Provided By: Shift-3
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.24.2008 at 02:55PM PDT, ID: 21435532

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.2008 at 02:58PM PDT, ID: 21435553

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.28.2008 at 02:45PM PDT, ID: 21457927

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.28.2008 at 02:59PM PDT, ID: 21458015

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628