Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6015

Node on Ubuntu: ENOENT error, but file does exist, I am sure

$
0
0

I have a JS script which attempts to copy CCTV files from one SMB location to another. All files are created in the same way are in essence the same. I am using globto get a list of all files.

90% of files copy just fine, however randomly some fail to copy. I am using

fs.readFileSync(filesArr[i]);

Which results in

enter image description here

Note I am showing the source file location and the destination at the top.

When I then use Files in Ubuntu I can see each file and open it!

I can not understand is why it works most of the time.


Viewing all articles
Browse latest Browse all 6015

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>