Feb-13-2021, 06:28 PM
Hi,
This is strange,
I have extra slashes in a 'path'.
I do not understand how it could happen.
I have a Host list, I'm iterating over it and adding a "path" to each name,
I'm going to download files from later on.
The host list goes like this:
CM04TMMV0001EK
CM04TMMV0002EK
Code
whole string -- \\CM04TMMV0001EK\c$\SBHI\Debug_Logs
whole string -- \\CM04TMMV0002EK\c$\SBHI\Debug_Logs
whole string -- \\\c$\SBHI\Debug_Logs
whole string -- \\\c$\SBHI\Debug_Logs
This is strange,

I do not understand how it could happen.

I have a Host list, I'm iterating over it and adding a "path" to each name,
I'm going to download files from later on.
The host list goes like this:
CM04TMMV0001EK
CM04TMMV0002EK
Code
lst = 'path/to/the/list.txt' with open (lst,'r') as lr : for itm in lr : itm=itm.strip() d_to_sacn =r"\\"+itm+"\c$\SBHI\Debug_Logs" print ("whole string -- ",d_to_sacn)here is a print out, I have a two extra lines at the bottom :
whole string -- \\CM04TMMV0001EK\c$\SBHI\Debug_Logs
whole string -- \\CM04TMMV0002EK\c$\SBHI\Debug_Logs
whole string -- \\\c$\SBHI\Debug_Logs
whole string -- \\\c$\SBHI\Debug_Logs