question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Delete files no longer in the input list.txt?

See original GitHub issue
  • Using latest version as provided on the master branch
  • Searched for similar issues including closed ones

What is the purpose of your issue?

  • Bug
  • Feature Request
  • Question
  • Other

Description

Delete files no longer in the list.txt?

I want to build a dynamic playlist folder with this and https://github.com/epsil/spotgen. Spotgen generates the playlists, then I download it with your scripts. Which is working fine. The problem is with the files are no longer in the playlist generated by spotgen. Can we somehow compare the input list with the output folder, and remove the difference? Not necceserly a future request. If you could point me to a right direction how to do this, I could do by myself with sh script (which connects the spotgen with this). I think, I need a list about the recent downloads (including the skipped files), so I can compare with the current and remove the difference.

Log

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
mibereczcommented, Jul 29, 2018

I started this project purely in shell script, since every tool was done and I just had to merge the two. But what the heck, I know JS, python should not be that hard.

Thanks for your help, just asking these questions helped me solve almost the whole problem by myself. The Spotipy part was the trick.

0reactions
ritiekcommented, Jul 29, 2018

Actually you could use a for loop over reading Spotify URI’s from a text file and call spotify.track on each iteration and append the “Artist - Track” value to another text file. I don’t really know how exactly you plan to do that so I won’t code it for you. You will be better off learning a bit of Python anyway. 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

CMD batch file to delete a file if not found in list from text txt file
It would be best not to put them in the same directory as the files being deleted. Run the .bat file from a...
Read more >
How to delete files from a folder using a list of file names in ...
Simple way is copy the txt file to a file called mydel.bat in the directory of the files to delete. Using an editor...
Read more >
remove file but exclude all files in a list - Ask Ubuntu
I get a filelist which contains text, which files are allowed. Now I have to delete all files which are not in this...
Read more >
Linux: Delete Files Listed in a File | Baeldung on Linux
Learn how to delete files listed in another file using pure Bash, xargs, sed, and awk.
Read more >
Interactively deleting files from a list - Unix Stack Exchange
The list is in the list.txt file. Why the following command doesn't work properly? while read i; do rm ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found