I am using the CCTV Manager Solution. I am trying to create a model to iterate over a series of folders and run the Import Access Tables script on the MDB file within. I am using inline variable substitution to construct the Access database file path. The script will not accept what I try to pass into it.
The Access database parameter is set as a File type. It works if I hardcode the Access database. But when I try to construct the Access database path using inline variable substitution, it errors out and won't accept that.
Here is my model:
It doesn't produce a valid name
folder = "C:\CCTV_Inspections\2020_05_11" folder_name = "2020_05_11" txt = "_PACP _ LACP _ MACP 6.0.mdb" folder + folder_name + txt 'C:\\CCTV_Inspections\x820_05_112020_05_11_PACP _ LACP _ MACP 6.0.mdb'
Raw encoding does
folder = r"C:\CCTV_Inspections\2020_05_11" folder_name = r"2020_05_11" txt = r"_PACP _ LACP _ MACP 6.0.mdb" folder + folder_name + txt 'C:\\CCTV_Inspections\\2020_05_112020_05_11_PACP _ LACP _ MACP 6.0.mdb'
And never use folders that begin with numbers, a, r, t, and a bunch of other characters too many to list
Your paths aren't able to make a valid filepath when concatenated together, hence my example of "raw encoding" by adding the little 'r' to the front of each element.