How To Loop Through Files To Automate ANYTHING - Excel VBA Basics Series

preview_player
Показать описание


In this basic VBA Training, I show you how to use VBA to easily loop through files in a folder, as well as filtering files by type. I also show you how to create folders, move files, copy files and rename files in 20 minutes.

⬇𝗗𝗢𝗪𝗡𝗟𝗢𝗔𝗗 𝗧𝗛𝗜𝗦 𝗪𝗘𝗘𝗞'𝗦 𝗪𝗢𝗥𝗞𝗕𝗢𝗢𝗞 𝗧𝗘𝗠𝗣𝗟𝗔𝗧𝗘 𝗛𝗘𝗥𝗘:

Timestamps:
0:00 – Introduction
1:00 – Overview
4:49 – Loop Through Files In Folder
11:28 – Move Pictures To Another Folder

EXCEL COURSES:

EXCEL PRODUCTS:


Follow me on my Social Media Accounts:

About Us:
I help Microsoft Excel enthusiasts turn their passion into profits so they can earn passive income using their skills without having to trade time for money.
I love making these videos for you each and every week. A great way of supporting Excel For Freelancers to keep this training free each and every week is by supporting us through one of the amazing products offered that will help you skyrocket your Excel Skills and reach your dreams.

Get Alerted IMMEDIATELY with new Free Training Videos & Workbook by subscribing here:

New Training Video Uploaded Every Tuesday And Saturday!

Thank you very much for your continued support,
Randy Austin

#LoopThroughFiles #RenameFiles #MoveFiles #CopyFiles
Рекомендации по теме
Комментарии
Автор

Hi Randy, Thanks for this training. I use the FSO object to create backups of my files. I can check if the path exists & create a new path with date & time stamp, if required. I learn something from your videos that I can adapt to my code. I'm looking into making backups for my backups on another drive. Then over writing the older files. (I'm retired and I think of projects to keep my mind active.)

robertbateman
Автор

Hi Randy, thanks so much. I really appreciate1

didiertheunpreditable
Автор

Hi Randy ... Always a new learning experience ... Thank you

nerenlakhraj
Автор

Hi there Randy .. good to learn new vba lesson from you again. Thank you for emailing me always

drojanprojectchannel
Автор

Just created a loop like that this afternoon!
Can't wait to learn things I missed ❤

ranilan
Автор

Hi Randy, Love how you're creating so much VBA content. A suggestion: You might want to indent the code in your subs, especially if you're making tutorials for people online. What are your thoughts?

Sancarn
Автор

thanks sir....
the best to learn step by step

abouyoussef
Автор

When I saw 'FileName = Dir(FolderPath &"*.")' I thought 'FileName' receives JUST first one file and had to be incremented, but NOT! Would you explain this?

analistaribeiro
Автор

is that possible to list all extension, like filter

abdulsafwan
Автор

Is this possible in a sharepoint location?

hectordominguez
Автор

Hello do u knw how to use Vba to use windows speech recognition

Chem.digital.study_tools
Автор

I use this to delete my temp folders, cookies and other useless stuff.

danp
Автор

Hello Randy,
I see on the news bulletin huge devastation in China and Vietnam. I hope all goes well with your family and friends and that once again it is propaganda.

henkvinck
Автор

e.g..
fileName = Dir(folderPath & "*.xml")
Do While fileName <> ""
fileNum = FreeFile Open folderPath & fileName For Input As #fileNum fileContent = Input$(LOF(fileNum), fileNum) Close #fileNum
...
...
Loop

chrisk.