View Single Post
  #3  
Old 04-06-2021, 04:18 AM
Chris_T Chris_T is offline
Registered User
 
Join Date: Mar 2021
Posts: 3
Hi Cameron, thanks for checking.

I have upgraded from SecureCRT version 8.3 on my Windows 10 PC, which is still the same as before.
With the old version we were able to open files from the local folder we started the .py file from, see below:

Code:
    outputfile = str(date.today())
    file1 = ("Inventory-" + outputfile + ".csv")
    f=open(file1,'w')
This now is not possible anymore. I have to exactly specify the path where to open the file:

Code:
localfolder = r'C:\\Users\..\\..\\..\\'
    
    outputfile = str(date.today())
    file1 = (localfolder + "Inventory-" + outputfile + ".csv")
    f=open(file1,'w')
This is not very convenient, as the folder might change from time to time. And for now I am not sure how to let python find the local folder by itself., this i have to investigate.

Regards, Chris

Last edited by cboyack; 04-06-2021 at 07:19 AM. Reason: Please use [CODE] and [/CODE] tags to denote areas of code
Reply With Quote