Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Trapick
Apr 17, 2006

Ceros_X posted:

Does anyone know of an app where you can get take a list of file or folder names from an excel doc (or notepad list or whatever) and feed it into a program that would then (when pointed at the right directory) copy those files/folders to another directory? This is probably pretty niche usage but it would be super useful for what I am trying to do, any leads would be great.
If you're on Linux or Mac, this is pretty easy with a bash one-liner. On windows if you can install Cygwin this should work as well:

code:
for file in $(<list_of_files.txt); do cp -r "$file" destination_folder_path; done

Adbot
ADBOT LOVES YOU

Trapick
Apr 17, 2006

Ceros_X posted:

So this would be limited to file names only? I guess I could use Find and Replace to rename all of the file contents from folder names and then use this. Would this try and copy, say, 200 files sequentially or simultaneously?

edit: looks like -r means recursive and will get files inside a directory, so I might be able to leave the file names as is..

Yeah, that would take a list of file or folder names. And as you found cp -r recursively copies, so that would copy the whole directory if you gave it a folder name. It would be sequential for each file/folder name (the for loop won't move to the next until the copy is done), I'm not sure of the internals of 'cp' but suspect it's sequential as well.

  • Locked thread