Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
I have 300 files in a folder. Based on their names I want to ditribute to 30 different folders.
Can any one help me in writing a batch script for this activity.

You want just any files to go to any folder, or what?
=====================================
If at first you don't succeed, you're about average.M2

Thank you very much for the response..
Based on the file name we need to segregate..File name specific.
Eg. we have File A,File B,File C and folder F1,F2 and F3
File A and B should go to F2 and File C to F3....
There are 300 files and 30 folders.Monthly once we need to segregate automatically by batch script.
I have list to identify which file to which folder..
Please help me to simplyfy my script
Example of script to move one file.
If exist C:\Mainfolder\File A MOVE C:\Mainfolder\File A C:\F2 ELSE (echo FILE NOT FOUND)Do I need to write it for 300 files in same way.Or do we have some looping to incorporate. I am not much familiar with batch scripting.
Thanks in Advance..

"I have list to identify which file to which folder.."
Let's see the list.
=====================================
If at first you don't succeed, you're about average.M2

AAMF0771
AAMF0801
AAMF0831
AAMF0892
RNMF0141
RNMF0161
RNMF0171
RNMF0221
RNMF0301
RNMF0561
RNMF0811
RNMF0881The above list for one folder...

That list tells us what?
=====================================
If at first you don't succeed, you're about average.M2

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |