I have a problem using pyperclip. I have to upload a bunch of documents to the web. I used the join method to make a string of the files contained in a specific folder. The problem comes when that string reaches 260 characters. pyperclip copies up to 260, the rest is not copied. Is there a way I can change this? Or another method I can use?
from os import listdir
from os.path import isfile, join
cell1 = str(cell1)
my_path = "C:\Users\\"+user+"\Desktop\folder\\"+cell1
onlyfiles = [f for f in listdir("C:\Users\\"+user+"\Desktop\folder\\"+cell1) if isfile(join(my_path, f))]
for doc in onlyfiles:
doc = '" "'.join(map(str, onlyfiles))
docs = '"' + doc + '"'
print docs
time.sleep(1)
#copiar directorio
from pyperclip import copy
copy(my_path)
keyboard.press(Key.ctrl)
keyboard.press('v')
keyboard.release(Key.ctrl)
keyboard.release('v')
time.sleep(1.5)
keyboard.press(Key.enter)
keyboard.release(Key.enter)