1.

Solve : Creating List file from a directory and comparing it with another list?

Answer»

I have not USED Batch process to a very extensive way and Now I have few requirement to do so.Please help me to figure out the code.

Below is what Iam trying to do :

Step1 : From a alltel FTP SITE I need to MOVE all the files in one directory called ManualImport to the local server which is \\server1\source and create a list file called maplist.txt which will have all the files in the Directory.
Code :
@echo off
cd \\server1\source
dir \\server1\source /b /a-d > maplist.txt

Step2 : In the local folder \\sever1\source there is already a list file called orignal_import_list.txt which has a list of files.Now COMPARE the orignal_import_list.txt with the maplist.txt and

Step3: If orignal_import_list.txt doesn't have any files in the maplist.txt then we need to remove it from orignal_import_list.txt

Please help me with this


I hope this should be easily possible :

Step1 : In the local folder \\sever1\source there is already a list file called orignal_import_list.txt which has a list of files names in it.Now compare the orignal_import_list.txt with the files in the folder \\sever2\source and
Step3: If orignal_import_list.txt doesn't have any files names in the \\sever2\source then we need to remove it from orignal_import_list.txt

Please help me with thisAny LUCK...



Discussion

No Comment Found