Move multiple files by vba

hdgfss

New Member
Joined
Aug 29, 2019
Messages
41
my files are located in C:\Users\WolfieeeStyle\Desktop\Files
i have to move 4 to 5 files(it can be more than this) from here C:\Users\WolfieeeStyle\Desktop\Files to C:\Users\WolfieeeStyle\Desktop
condition-check wheather my files are located in C:\Users\WolfieeeStyle\Desktop\Files if yes then move it to C:\Users\WolfieeeStyle\Desktop and if not then do nothing
Important- i will add the file names in the vba code so that if it is there then it will be moved ( i will put 7 or 8 files name in vba code or more)
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Sorry Sir I don't know who he is
and that code is for only 1 file
and i am dealing with multiple file sir
Our process is for multiples files Sir
 
Upvote 0
Funny how the question is very very similar, including the file locations to be used.
You said you would hardcode the filenames & that is what the code in the link does. Simply repeat the code for the other filenames.
 
Upvote 0
Sir if i have to move 10 files then i have to make 10 macros sir
it is not a good option and i think it is not recommendable also sir
 
Upvote 0
Then how are you going to hardcode the filenames?
 
Upvote 0
I don't know sir that's why i am looking for guidance
Plz Guide Sir
 
Last edited:
Upvote 0
hdgfss,

What you are going to find is that people here typically do not like to do people's homeowrk/assignments for them (that really isn't ethical).
However, we will be willing to point you in the right direction, give you hints, or critique code that you have come up with. Both Fluff and I have given you tips, but you still not have shown any effort of your own on this question.

So I suggest you look at the links we have provided, and try to see what coe you can come up with. If it doesn't work out quite right, you can post the code you have attempted here, and we can point out where the problem areas are.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,212,933
Messages
6,110,759
Members
448,295
Latest member
Uzair Tahir Khan

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