I'm working on a large-scale unstructured data project in my org, and there's a number of very large volumes which need to be relocated that have thousands of folders (which are named 0000000 - 9999999 in random patterns), each containing thousands of small files. In order to spread the load, I've broken out the robocopy jobs into batches.
The issue I'm running into is this: When I create the commands (in Excel, pasted into Notepad++ for delimiter removal, then pasted again into CMD or PowerShell) I have leading zeros in front of the folder names. Further investigation has revealed that this happens with plain text as well.
Nothing I've tried as far as changing cell types, looking for hidden characters, etc. has resolved the issue. See posits below for detail, but I've pretty much narrowed this down to an issue with the terminal application.
Couple of other posits to note:
- The only way that I've found that it works correctly is when I paste the data into the standalone Windows PowerShell pasted into standalone WPS
NO standalone CMD pasted into standalone CMD
NO standalone PowerShell 7 pasted into standalone PowerShell 7
NO Terminal app CMD pasted into Terminal CMD
NO Terminal app PowerShell 7 pasted into Terminal PowerShell 7
NO Terminal app Windows PowerShell pasted into Terminal WPS
- I've ruled out issues with keyboard layout, language, etc with my workstation by trying these operations directly from the console of a separate server.
- It's not an issue with Notepad++. I've tried a number of different text editors, and also Word.
- It does not happen when I generate the text manually... i.e. typing it out in a notepad and pasting it.
- The paste appears correctly when I place the data into any other application... it's only in the terminal applications.
In my 30 years of sysadmin work, I've never come across this issue. I can work around it by using the standalone Windows PowerShell, but this is a real head-scratcher that I'd like to resolve if I can. I'm a little hesitant to get Microsoft Support engaged on it since it'll likely be a lot of shuffling around before getting to "it's a known issue and we don't have a resolution at this time." like I said, I've got a mountain of work to do to get all this data relocated and I'd prefer to use the tabbed Windows Terminal console, so I thought I'd throw it out there to you fine people and see if anyone has experienced it.
hexdump -C(no file; instead, paste problematic string into the standard input and pressEnter, then pressCtrl+C). FYI, you can downloadhexdumpfrom di-mgt.com.au/hexdump-for-windows.html