0

Python:copying a drive

copying a drive and showing output in the terminal of individual files being copied

17th Jan 2018, 4:28 AM
Michael Bosher
Michael Bosher - avatar
3 Answers
+ 1
Hi, Basically, i wrote the code below, which reads the ,hidden file and the outputpath to omit duplicate files and hidden files from the copy list. Then it adds \ between filenames which have two or more words before sending the command to the terminal and copying the files. I have small error output on the terminal, as shown below. it would be great if someone could explain it to me. The code works, my main question is: could i have written it an easy way whilst still showing an output of the files been copied and regarding style and code reuse would my code be deemed wrong or is it ok?
17th Jan 2018, 4:38 AM
Michael Bosher
Michael Bosher - avatar
+ 1
i thought i added the code but it mustnt have uploaded so here it is: https://code.sololearn.com/cbwj3gv0T1JX/?ref=app
17th Jan 2018, 8:02 AM
Michael Bosher
Michael Bosher - avatar
0
herr is the error: cp: cannot create regular file '/home/michael/Documents/Documents/Yulia'\''s Documents/Ð'
#x27;\302\232''Ð'
#x27;\302\220''Ð'
#x27;\302\232'' Ð'
#x27;\302\234''ЫШÐ'
#x27;\302\233''Ð'
#x27;\302\225''Ð'
#x27;\302\235''Ð'
#x27;\302\230''Ð'
#x27;\302\225'' Ð'
#x27;\302\230''Ð'
#x27;\302\227'' Ð'
#x27;\302\237''Ð'
#x27;\302\236''Ð'
#x27;\302\227''Ð'
#x27;\302\220''Ð'
#x27;\302\237''РÐ'
#x27;\302\236''ШÐ'
#x27;\302\233''Ð'
#x27;\302\236''Ð'
#x27;\302\223''Ð'
#x27;\302\236'' Ð'
#x27;\302\222''Ð'
#x27;\302\225''Ð'
#x27;\302\232''Ð'
#x27;\302\220'' Ð'
#x27;\302\234''Ð'
#x27;\302\225''ШÐ'
#x27;\302\220''Ð'
#x27;\302\225''Т Ð'
#x27;\302\222''Ð'
#x27;\302\220''Ð'
#x27;\302\234'' Ð'
#x27;\302\222'' Ð'
#x27;\302\226''Ð'
#x27;\302\230''Ð'
#x27;\302\227''Ð'
#x27;\302\235''Ð'
#x27;\302\230'' - Ð'
#x27;\302\236''Ñ'
#x27;\302\204''иÑ'
#x27;\302\206''иалÑ'
#x27;\302\214''нÑ'
#x27;\302\213''й Ñ'
#x27;\302\201''айÑ'
#x27;\302\202'' Ð'
#x27;\302\236''лÑ'
#x27;\302\214''ги ЮÑ'
#x27;\302\200''ковÑ'
#x27;\302\201''кой.mht': File name too long
17th Jan 2018, 4:41 AM
Michael Bosher
Michael Bosher - avatar