Sign in with
Sign up | Sign in
Your question

batch file to extract files from a list and rename and save elsewhere

Tags:
  • Windows 7
  • DOS Batch
  • Operating Systems
  • Software
Last response: in Windows 7
Share
October 15, 2014 12:50:04 PM

Hi,
Not sure if a batch file is what will do this for me, but I have a long list of folders and subfolders. The top level folder is a 'program name', the next level is an 'applicant name', and then within each applicant's folder there is a file where the word 'reference' will be part of the file name. I need to be able to go through this long list of folders and extract each applicant's reference document (sometimes a txt file, sometimes a pdf) and rename it with the program name-applicant name which will be the names of the top level and 2nd level folders and save it to a separate folder that will be just the 'reference' documents. Hope I am explaining clearly! Thanks!!

More about : batch file extract files list rename save

October 15, 2014 12:55:50 PM

Jodyg64 said:
Hi,
Not sure if a batch file is what will do this for me, but I have a long list of folders and subfolders. The top level folder is a 'program name', the next level is an 'applicant name', and then within each applicant's folder there is a file where the word 'reference' will be part of the file name. I need to be able to go through this long list of folders and extract each applicant's reference document (sometimes a txt file, sometimes a pdf) and rename it with the program name-applicant name which will be the names of the top level and 2nd level folders and save it to a separate folder that will be just the 'reference' documents. Hope I am explaining clearly! Thanks!!


Microsoft PowerShell is a much richer language than just a bat language.

Were you hoping that someone would post the code necessary?
m
0
l
October 15, 2014 1:25:21 PM

kanewolf said:
Jodyg64 said:
Hi,
Not sure if a batch file is what will do this for me, but I have a long list of folders and subfolders. The top level folder is a 'program name', the next level is an 'applicant name', and then within each applicant's folder there is a file where the word 'reference' will be part of the file name. I need to be able to go through this long list of folders and extract each applicant's reference document (sometimes a txt file, sometimes a pdf) and rename it with the program name-applicant name which will be the names of the top level and 2nd level folders and save it to a separate folder that will be just the 'reference' documents. Hope I am explaining clearly! Thanks!!


Microsoft PowerShell is a much richer language than just a bat language.

Were you hoping that someone would post the code necessary?


m
0
l
Related resources
October 15, 2014 1:27:08 PM

Thanks for your reply! I was hoping it might be an easy batch file that someone would know off the top of their head.... :)  I've used Powershell with guidance from Microsoft tech support, so I know I wouldn't be able to do that on my own....!
m
0
l
October 15, 2014 1:32:26 PM

Jodyg64 said:
Thanks for your reply! I was hoping it might be an easy batch file that someone would know off the top of their head.... :)  I've used Powershell with guidance from Microsoft tech support, so I know I wouldn't be able to do that on my own....!


I don't have time right now, but if somebody doesn't post something I will see if I can write it tonight....
m
0
l
1 minute ago

kanewolf said:
Jodyg64 said:
Thanks for your reply! I was hoping it might be an easy batch file that someone would know off the top of their head.... :)  I've used Powershell with guidance from Microsoft tech support, so I know I wouldn't be able to do that on my own....!


I don't have time right now, but if somebody doesn't post something I will see if I can write it tonight....


m
0
l
less than a minute ago

Oh my, you are very generous! I would be very grateful for any help I can get.....thank you, thank you!
m
0
l
!