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:
- Created 5 years ago
- Comments:10 (6 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
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.
Actually you could use a
for
loop over reading Spotify URI’s from a text file and callspotify.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. 😃