SpiritQuaddicted / sourceforge-file-download

Allows you to download all of a sourceforge project's files. Downloads to the current directory into a directory named like the project. Pass the project's name as first argument, eg `./sourceforge-file-download.sh inkscape` to download all of http://sourceforge.net/projects/inkscape/files/
72 stars 24 forks source link

Attempting to remove "?viasf=1" from downloaded files but "No such file or directory" error message. #8

Closed fsword7 closed 10 months ago

fsword7 commented 10 months ago

I attempted to download files from sourceforge but I got error messages trying remove "?viasf=1" from downloaded files.

remove ?viasf=1 suffix

find . -name '*?viasf=1' -print0 | xargs -0 rename --verbose "?viasf=1" ""

I got error message said:

xargs: rename: No such file or directory

I am using Ubuntu 23.10 distro.

Thanks, Tim

SpiritQuaddicted commented 10 months ago

You need a rename tool. Try apt install util-linux.

fsword7 commented 10 months ago

Ok, I now got it. For Ubuntu system, 'util-linux' was already installed but I now did 'apt install rename'.

I tried it but it did not work. Rename gave me syntax error. I changed a line:

find . -name '*?viasf=1' -exec rename -v "s/\?viasf=1//" {} \;

After I changed it, everything worked now.

Thanks again, Tim

SpiritQuaddicted commented 10 months ago

Ah, weird! Thank you for posting the solution :) I hope the script works well for you now.