Macro to Create Folders and save the PDF Files

hardeep.kanwar

Well-known Member
Joined
Aug 13, 2008
Messages
691
Dear Experts

I have thousands of PDF File ,each Client name have hundered of Files,Say 10000-Jaswant Motors-1,10000-Jaswant Motors-2,10000-Jaswant Motors-3

What i need to Macro create multiple Folders like 100000,100001,100003 and Paste the Files in particular Folders

PDF Files names are 10000-Jaswant Motors-1.pdf and First 5 Code are unique Codes.

Is it possible that Macro fetch the first 5 digit and create the Folder Name-10000 and paste all the Files related to 100000 into that Particular Folders

File Name
10000-Jaswant Motors
10001-Speedways
10003-S Goel & Goel
10004-N S Motors
10005-Kamal Enterprises
10006-R K Mahajan Enterprises
10007-K S Motorcycle Division
10008-Kalsi Motors
10009-B M Enterprises
10010-Duggal Automobiles
10011-Surya Motors
10012-Farid Service Station
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
What i need to Macro create multiple Folders like 100000,100001,100003

Really ? Why 6 digits ?

Client codes are 5 digits :
10000-Jaswant Motors
10001-Speedways
10003-S Goel & Goel

I think the folders should be 10000,10001,10003
 
Upvote 0
Also ...

Will the new folders be subfolders of the current folder containing those files ?
 
Upvote 0
Really ? Why 6 digits ?

Client codes are 5 digits :
10000-Jaswant Motors
10001-Speedways
10003-S Goel & Goel

I think the folders should be 10000,10001,10003
Thanks for the reply

It's a unique Code and always have 5 Digit code,sorry i have put 6 digit code
 
Upvote 0
In post#1 you said create the Folder Name10000
In post#5 you said folder name should be 10000-Jaswant Motors (this is more difficult)

You said in post#1 that name of the files are 10000-Jaswant Motors- 1 , 10000-Jaswant Motors- 2
10000-Jaswant Motors- 1.jpg

Is EVERY file name like this ?
[ 1xxxx][Hyphen][Name of Company][Hyphen][Space][file number][.jpg]

It is VERY important that you do not tell me the wrong answer
 
Upvote 0

Forum statistics

Threads
1,223,236
Messages
6,170,906
Members
452,366
Latest member
TePunaBloke

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