Consulting

Results 1 to 2 of 2

Thread: EDITING FILENAMES IN MULTIPLE FOLDERS

  1. #1

    EDITING FILENAMES IN MULTIPLE FOLDERS

    Hi

    I have a number of files in alphabetical order in several folders. The number of files in each folder can vary over time.

    I need to prefix each filename in each folder with a number to number-order all the files in the folder

    e.g.

    filename1.docx becomes 01_filename1.docx
    filename2.docx becomes 02_filename2.docx
    filename3.pdf becomes 03_filename3.pdf

    and so on. However if in FOLDER1 there are 30 files, then FOLDER2 needs to begin with file31.docx becoming 31_file31.docx and so on. I have 7 Folders.

    Is this possible using vba? Thanks in advance for any help.

  2. #2
    Forgot to add that if the code is run again, then the numbers prefixed to each file would have to be "over-written" or deleted first before being numbered again. This is due to the fact that files may be added/removed from each folder.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •