We help IT Professionals succeed at work.
Get Started

VB Script: move-copy Folders and Subfolders

Luis Diaz
Luis Diaz asked
Last Modified: 2015-03-05
Hello experts,

I have a “Infolder” which contains sub folder:

Each sub folder Contain a subfolder named "inconsistency-data" and xls files (it also contains other folders and files)

I would like to

Set a DesFolder
Create if they don't exist and

 And copy just the subfolder "inconsistency-data" with all xls files if xls files already exist, the script should overwrite it.

Logs / script requirements:
1-Log file should be generated at InFolder and named as following "log-transfer-file"
2-Infolder should be defined as should be always the same in which is located the vbscript (Currentdir variable will be appreciate)
3-If Desfolder doesn't exist log output should  be: Now & Desfolder doesn't exist
4-If one of the Subfolder doesn't have the sub-subfolder "inconsistency-data" log output should Now Folder(Path) doesn't contains the sub-sub folder "inconsistency-data"
5-If one of inconsistency-data" folder doesn’t contains " log output should Now Folder(Path) & “inconsistency-data” is empty
6-If condition 3,4,5 are false logoutput should Now “SUCCESS: folders and files have been properly transferred”
Watch Question
Test your restores, not your backups...
Expert of the Year 2019
Distinguished Expert 2020
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE