Python Forum
Shutil FileNotFoundError: Errno 2 Help
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Shutil FileNotFoundError: Errno 2 Help
#5
Hi deanhystad,

Thanks for your help thus far. Please bear with me as I'm still trying to understand the logic.

I have source text file with a list of all file names in it. I also have a destination text file with each path for each file read from the source text file and where it needs to go.

Wouldn't I need to have 2 for loops? The first for loop is simply reading the contents of the source text file whereas the 2nd for loop is reading the corresponding path from the destination text file.

I can understand that the issue is where the placement of the 2nd for loop is but then how would I read and pass that destination path from the destination text file to 1st for loop?

Thanks & Appreciate the help so far!
Reply


Messages In This Thread
RE: Shutil FileNotFoundError: Errno 2 Help - by lord_kaiser - Aug-09-2020, 12:32 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  use of shutil.copytree with ENOTDIR exception yan 2 1,137 Nov-29-2023, 03:02 PM
Last Post: yan
  FileNotFoundError: [WinError 2] The system cannot find the file specified NewBiee 2 1,806 Jul-31-2023, 11:42 AM
Last Post: deanhystad
  shutil.move make data corrupt kucingkembar 0 909 Feb-01-2023, 01:30 PM
Last Post: kucingkembar
  Need Help: FileNotFoundError:[Errno 2] No such file or directory python202209 5 2,948 Sep-12-2022, 04:50 AM
Last Post: python202209
  Merge htm files with shutil library (TypeError: 'module' object is not callable) Melcu54 5 1,822 Aug-28-2022, 07:11 AM
Last Post: Melcu54
  FileNotFoundError: [Errno 2] No such file or directory: 'word2vec.model' Anldra12 6 6,400 Jul-07-2021, 07:29 AM
Last Post: Anldra12
  FileNotFoundError: [Errno 2] No such file or directory: 'model/doc2vec.model/Articles Anldra12 10 6,180 Jun-11-2021, 04:48 PM
Last Post: snippsat
  extra slashes in the network path for shutil.copy tester_V 3 3,960 Jun-02-2021, 07:57 AM
Last Post: supuflounder
  concatenat - shutil jmabrito 3 2,328 Feb-11-2021, 12:17 PM
Last Post: jmabrito
  FileNotFoundError: [Errno 2] No such file or directory: 5l3y3r 6 8,418 Nov-02-2020, 12:48 PM
Last Post: 5l3y3r

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020