Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.linux.suse    |    Suse is actually not that bad    |    138,051 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 136,150 of 138,051    |
|    Carlos E. R. to All    |
|    Re: bash script    |
|    20 Feb 17 23:40:07    |
      From: robin_listas@invalid.es              On 2017-02-20 21:40, Sidney_Kotic wrote:       > Hi everyone.       >       > I have sort of a problem. I'd like to search through various       > directories and copy, or move, files to a single directory. Minus the       > directory structure and with lots of special characters/spaces in the       > file names. This would be fairly easy except I don't want to overwrite       > an existing file (the -n option). The option works, but it doesn't tell       > me with a return code (i.e. nonzero) that it did nothing. Anybody got       > an idea how to accomplish this with a bash script?              Has it got to be a script? Because it could be done with 'mc', Midnight       Commander. If you don't know it, it is a very powerful text mode file       browser that can run in a terminal (xterm, konsole, whatever).              For instance, select on menu a search for your files, then select       "panelize" to put them in the file panel, mark them (* on numeric       keypad), then F5 or F6 to copy/move to destination (the other panel). It       will ask on conflicts.              If you want a script, don't let 'cp' do the decision. For each file use       "test" to find if that file exist on the destination directory, and if       it does, prompt the user what to do. Act based on choice.              --       Cheers,        Carlos E.R.              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca