0

I have a large group of stocks I follow in folders on my pc which follows the following template? country > sector > company. With various data for each company in the company folder. So it would read something like D:\Data\US\Tech\AAPL

I want to create a new folder D:\Data\Active_Investments which includes a shortcut to all the companies I have active investments in. I have a list of all the directories. So I just need to iterate through that list and add the shortcut but I don't know-how. Can anyone help with this?

for investment in investment_links:
    if int(comp) == int(comp_cik):
        active_investments = r"D:\Data\Active_Investments"
        shortcut_link = investment

where investment = D:\Data\Tech\AAPL

JPWilson
  • 691
  • 4
  • 14
  • Is this a one-time thing? If so, doing so manually might be faster than trying to figure out how to create actual shortcuts with Python (which will probably need to use an external library to interact with Windows, such as pywin) – DeepSpace Jul 28 '20 at 17:45
  • its a fair amount of companies which changes over time – JPWilson Jul 28 '20 at 17:51

0 Answers0