Trying do automate a batch conversation of files.
Have an application open
Open (not a simple open, it’s an import procedure) file A from folder A.
Save and close the file (actually there are several files created and open as result of importing the file A)
Repeat the above for file B, file C and so on. All from same folder A.
What having trouble with is how to perform this loop for each file in the folder.
I have tried to use the Directory.GetFiles and also the For Each Row having the file names Inna an Excel-file.
In the Open (import) The file name (including file extension) of file to be opened should be filled in and this of course needs to be a different name each time. If this could be from all the files in a folder or from an Excel-file. Also if possible to have it verify If correct file type in the case of using all files in folder.
Yes the “For Each File in Folder” might be the way to go. Thank you for suggesting that.
Question:
For the application I’m automating (Autodesk Inventor) I need to use the file name including the file extension.
I have tried to use … file … as the input (variable) for file to open, but it includes the file path.
How do I filter (trim) away the file path, and only keep the file name including file extension (.DWG)
If I have files of different file type in this folder. How can I have it to only look for a specified file type. It would make it easier to not have to split the files into several folders and instead make it only care about a specified file type.
Thank you very much for suggestions on this.
/Jonas