NEED MACRO TO MOVE PDF INVOICES INTO DIVISION's MULTIPLE JOB#'s SUB-FOLDERS

ipi99

New Member
Joined
Mar 7, 2015
Messages
27
Hello Everyone,
Good day

I NEED MACRO TO MOVE PDF INVOICES INTO DIVISION MULTIPLE JOB#'s SUB-FOLDERS

Everyone I’m new to EXCEL VBA I want to one VBA EXCEL MACRO that can move my

PDF INVOICES (19361-11599-113) Files FROM
SOURCE FOLDER (Y:\)
into
SHARED DESTINATION FOLDER

(Z:\Billing Data\Central Region (Riyadh)\BMC\19361\PDF Invoices)

JOB# WILL BE VARY BUT DIVISION WILL BE SAME (BMC)

Z:\Billing Data\Central Region (Riyadh)\BMC\19361

Z:\Billing Data\Central Region (Riyadh)\BMC\19362

Z:\Billing Data\Central Region (Riyadh)\BMC\3102

Z:\Billing Data\Central Region (Riyadh)\BMC\4263

Z:\Billing Data\Central Region (Riyadh)\BMC\20120

BMC HAS ABOUT 5000 FOLDERS RENAMED LIKE

1001
3102
9889
19361
20120

LIKE 19361 and other folders EACH JOB# FOLDER HAS ABOUT 10 TO 15 SUB-FOLDERS RENAMED FOLDER AS FOLLOWS:

Closed Project Detail
Collection
Commercial Invoices
Confirmation
Contract Variation & FTI
Decrease & Release Letter
Excel Invoices
LC & LG
Legal Case
Others-VAT
PC&Situation
PDF Invoices
1.png
2.png


Please help me to make one macro that can move my PDF Invoices

PDF INVOICES NAME

19361-11789-113
3102-11789-113
20120-11789-113

Macro should move PDF into each destinaion folder as per their job numbers.

I scan about 200 to 415 PDF every day and rename Each PDF as above then move into BMC Division in PDF Invoices folder.

I attached PDF Screen shot for more details.


Thanks in advance
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Perhaps you could elaborate or simplify these things for me:

  1. do you mean to move anything starting with a specific string like "19361" to the "\bmc\19361" folder? or just PDFs you specifically choose?
  2. are these PDF file names stored somewhere in excel, or just the folder?
  3. do you ever have these PDF's opened or interacted with in excel?
i also want to inform you that you can rename the pdf using VBA as well so you could automate all that work
 
Upvote 0
Thank you so much ???? Sir, for your kind attention and time I'm new to VBA with broken English ?
I hope I will improve day by day with it.

Q.
"do you mean to move anything starting with a specific string like "19361" to the "\bmc\19361" folder? or just PDFs you specifically choose?

Ans: 19361, 2985, 3102, etc... all are job name folders. In Central Region folder it has
BMC contains 5000 job folders like above
CRES 2000 folders
SG 500 folders

All scanned renamed PDF files ending with "113"
All PDF Invoices file names like this starts with "foldername-Invoicenumber-113"
  1. are these PDF file names stored somewhere in excel, or just the folder?
Ans: Initially I scan Invoices in a sharing folder then rename them as per their job name and Invoice number
Like
3102-123456-113
29851-12345-113
19361-1234567-113

After rename I move PDF one by one in their same job name destination folder
Like in

This Renamed PDF "3102-123456-113"
I will move into below folder
"Central\BMC\3102\PDF Invoices"

  1. do you ever have these PDF's opened or interacted with in excel?
No but I plan to open those PDF from excelsheet. Currently I'm using a code made by Mr.John that can turn All central data folders into hyperlinks as per folders name. I attached a snap folders are displayed in excel.

I asked to Mr. John also if he can display the PDF files in the folder name "PDF Invoices" show as hyperlinks in the same row. Attached snap
1579718219320_2.png
 
Upvote 0
Ans: 19361, 2985, 3102, etc... all are job name folders. In Central Region folder it has
BMC contains 5000 job folders like above
CRES 2000 folders
SG 500 folders

do these folders ever contain the same job folder?
example: does 3102 appear in JUST the BMC folder or can it also be in CRES?
 
Upvote 0
do these folders ever contain the same job folder?
example: does 3102 appear in JUST the BMC folder or can it also be in CRES?

Yes lots MATCHING Job names folders are existing in different divisions folders.

Like BMC 3102
CRES 3102

SG 19-0001
PMD 19-0001

SPD 3102
SIN 19-0006
SG 20-0001
CELLNET 20-0001
Etc.
 
Upvote 0
are you able to name the PDF like BMC3102-123456-113 as opposed to 3102-123456-113 otherwise is there a way i can tell which PDF goes to BMC/CRES/SG?
 
Upvote 0
All divisions PDF renamed like this
3102-123456-113

After rename I will make new empty folders Like BMC CRES etc.

Then from there the all of BMC PDF will go to BMC\3102\pdf Invoices
CRES PDF will go to CRES\3102\pdf Invoices.

THANKS ???
 
Upvote 0
After rename I will make new empty folders Like BMC CRES etc.

okay so i just want to make sure:
you're going to separate the invoices into new folders to determine which go where?
if so what are the new file paths to those folders?
if not maybe you can clarify what you mean.
 
Upvote 0
okay so i just want to make sure:
you're going to separate the invoices into new folders to determine which go where?
if so what are the new file paths to those folders?
if not maybe you can clarify what you mean.

It will like

Y:\Today invoices\BMC
Y:\Today invoices\CRES
etc

Then from Each folder PDF Invoices will to this

Z:\Central\BMC\3102\PDF Invoices
 
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top