i have a script which will do a specific task for a file in a folder,now i would like to do the same task for the all files in that folder(25 files).how can i do that?
Thanks in advance.
i have a script which will do a specific task for a file in a folder,now i would like to do the same task for the all files in that folder(25 files).how can i do that?
Thanks in advance.
With Python that is a simple task:
import os
# list just the files in a given folder
folder = 'C:/Temp'
for (paths, dirs, files) in os.walk(folder):
# testing, this shows a list of filenames
print files
# now loop through the list of filenames
for filename in files:
# testing
print filename
# now enter code to process each of your files
# ...
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.