1

I have downloaded over 10,000 files and need to move them to a different folder than my downloads folder. Unfortunately, these files have miscellaneous names, and some of them contain invalid characters (particularly a forward slash "/", such as when a file is named "filename 1/2").

These files are individually placed in folders, so I need to remove them by searching with "*", sorting by file type, and selecting the files not in folders. When clicking/dragging to a new folder, the entire window freezes and needs to be restarted. As a workaround, I was attempting to compress the files into a zipped folder to move more easily.

Unfortunately, the compression does not work with file names containing invalid characters. Attempting to search for a forward slash produces no results. Escaping the forward slash with a ~="/" search also produces no results, which is unfortunate since that is the only answer I've found via Google.

A manual search will take far too long. Attempting to compress gives a specific filename (in an error message) which I can then search for, but the compression attempt also takes a significant amount of time, so this process would be lengthy as well.

I'm willing to use any other workarounds for moving large quantities of files as well, but I think it would be productive to clean the file names to prevent similar issues in the future. Does anyone have any advice?

  • If those files are already in a separate folder, just moving the folder to another location should be instantaneous. Have you tried using mv from the commandline? – Lieven Keersmaekers Nov 25 '18 at 15:02
  • The problem with that is that I do not only need to move the files, I also need to restructure them since each single file is in its own separate folder. That was the purpose of the * search. – chokfull Nov 25 '18 at 15:39
  • If you don't mind using Powershel, I'd start with building a list of file using [System.IO.Directory]::EnumerateFiles(<yourdownloadfolder>,"*","AllDirectories"). With that info at hand, it becomes easy(ier) to match each file to a specific pattern and use move-item to move it to where you want. – Lieven Keersmaekers Nov 25 '18 at 17:17

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.