kcatnip9
asked on
Batch script needed for same file name but different file types
Hello -
We have an internal process that creates an index file with a unique name ( 12345.idx) and places it into a general directory. At some point - either hours or days - another file - which is a PDF - will have the same name (12345.pdf) - and it will be moved into the general directory.
I'm looking of a dos Batch file script that when it finds a match of the same file name for both types (12345.idx , 12345pdf) - it will MOVE these files from the general directory and move them into another directory for processing.
Thank you in advance! ~k
We have an internal process that creates an index file with a unique name ( 12345.idx) and places it into a general directory. At some point - either hours or days - another file - which is a PDF - will have the same name (12345.pdf) - and it will be moved into the general directory.
I'm looking of a dos Batch file script that when it finds a match of the same file name for both types (12345.idx , 12345pdf) - it will MOVE these files from the general directory and move them into another directory for processing.
Thank you in advance! ~k
ASKER
Very close... thank you!
Sorry - The issue is now is the file name convention - which I didn't list correctly. The PDF name is in the IDX file name.
12345.pdf.idx
12345.pdf
So when I run your script - it finds the IDX file - but based on the batch output of the file name match - it lists the PDF file as 12345.pdf.pdf.
Sorry - The issue is now is the file name convention - which I didn't list correctly. The PDF name is in the IDX file name.
12345.pdf.idx
12345.pdf
So when I run your script - it finds the IDX file - but based on the batch output of the file name match - it lists the PDF file as 12345.pdf.pdf.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Works perfect. Thank you for assisting so quickly. Awesome job!
Open in new window