tags:

views:

13

answers:

0

Hi. - I have a number of directories in Z:\AEPMDOCS

These directories also have one or more subdirectories with files in them - how can I rename all the files within the directory tree to include the first Directory at he begining of the Filename.
EXAMPLE Z:\AEPMDOCS\JONESA\test1.txt should become Z:\AEPMDOCS\JONESA\JONESA-test1.txt Z:\AEPMDOCS\JONESA\test2.doc should become Z:\AEPMDOCS\JONESA\JONESA-test2.doc Z:\AEPMDOCS\JONESA\test3.pdf should become Z:\AEPMDOCS\JONESA\JONESA-test3.pdf

Z:\AEPMDOCS\JONESA\2008\test5.txt should become Z:\AEPMDOCS\JONESA\2008\JONESA-test5.txt Z:\AEPMDOCS\JONESA\2008\test6.doc should become Z:\AEPMDOCS\JONESA\2008\JONESA-test6.doc Z:\AEPMDOCS\JONESA\2008\test7.xls should become Z:\AEPMDOCS\JONESA\2008\JONESA-test7.xls Z:\AEPMDOCS\JONESA\2008\test8.pdf should become Z:\AEPMDOCS\JONESA\2008\JONESA-test8.pdf

Z:\AEPMDOCS\JONESA\2008\correspondence\test32.pdf should become Z:\AEPMDOCS\JONESA\2008\correspondence\JONESA-test32.pdf Z:\AEPMDOCS\JONESA\2008\correspondence\test42.msg should become Z:\AEPMDOCS\JONESA\2008\correspondence\JONESA-test42.pdf

Z:\AEPMDOCS\JONESA\2007\test9.pdf should become Z:\AEPMDOCS\JONESA\2007\JONESA-test9.pdf Z:\AEPMDOCS\JONESA\2007\test10.txt should become Z:\AEPMDOCS\JONESA\2007\JONESA-test10.txt Z:\AEPMDOCS\JONESA\2007\test11.xls should become Z:\AEPMDOCS\JONESA\2007\JONESA-test11.xls Z:\AEPMDOCS\JONESA\2007\test12.doc should become Z:\AEPMDOCS\JONESA\2007\JONESA-test12.doc Z:\AEPMDOCS\JONESA\2007\test13.pdf should become Z:\AEPMDOCS\JONESA\2007\JONESA-test13.pdf

can anyon help please

email [email protected]

Many Many THanks KOSTAS