Need help to write batch file.

I have a program that deletes and generates a new folder name daily. It keeps the first 3 letters of the folder and then #s and letters afterwards change daily. But I need to be able to copy a folder within it that does not change to a different location? Any ideas that will work. Trying to keep it simple as possible as well. I am not batch file expert by no means.
F35_TechAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

NVITCommented:
Save this to a .bat file:
Note: This version ECHOs the xcopy command, as a visual confirmation for you. If you are fairly certain it should work, remove the ECHO to run it for real:

for /d %%a in (c:\ABC*) do (ECHO xcopy "%%a\unchanging\*.*" "c:\newlocation\" /e)

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
F35_TechAuthor Commented:
Thank you I will give it shot and update shortly....
0
F35_TechAuthor Commented:
Executed properly and worked perfect... Greatly appreciated I am not a Windows guy and I understood perfectly.
0
NVITCommented:
Thanks for the update, F35. I'm glad it worked for you. Have a great weekend...
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.