Link to home
Start Free TrialLog in
Avatar of Jim Metcalf
Jim MetcalfFlag for United States of America

asked on

batch file needed .bat preferred but powershell might be required

source directory contains the file i want to copy to another location.
source directory is c:\4
destination is c:\3

I need the batch file to copy the newest ".txt" file only (and place it in the destination.
I also need it to name the file "recent.txt" in the destination folder
Can someone write this for me?

As stated earlier.  a batch file is preferred but powershell may be required... i am unsure
SOLUTION
Avatar of oBdA
oBdA

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Jim Metcalf

ASKER

I'm getting an error.
screenshot provided
Capture.JPG
Avatar of oBdA
oBdA

You need to save that as a batch file, as in "Whatever.cmd"; you can't paste it directly into a command prompt.