Move multiple files by vba

hdgfss

New Member
Joined
Aug 29, 2019
Messages
20
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)
 

hdgfss

New Member
Joined
Aug 29, 2019
Messages
20
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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
33,573
Office Version
365
Platform
Windows
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.
 

hdgfss

New Member
Joined
Aug 29, 2019
Messages
20
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
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
33,573
Office Version
365
Platform
Windows
Then how are you going to hardcode the filenames?
 

hdgfss

New Member
Joined
Aug 29, 2019
Messages
20
I don't know sir that's why i am looking for guidance
Plz Guide Sir
 
Last edited:

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
51,771
Office Version
365
Platform
Windows
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:

Forum statistics

Threads
1,085,193
Messages
5,382,242
Members
401,781
Latest member
Dlloyd15

Some videos you may like

This Week's Hot Topics

Top