Copy files

Associate
Joined
11 Feb 2024
Posts
1
Location
Austria
We have a folder with over 300k image files in separate subfolders, I want to copy all the files together into another folder without the subfolders , and without overwriting them , also we need to copy the long path name files automatically without having to shortening it every time we have the long pathname message .
A colleague tried Fastcopy and SyncToy but neither of them worked, the closest to what I wanted are Syncabck Pro and Gs Richcopy 360 but the free editions are so limited and I don't want to purchase paid tools because it is a task for 1 time.
Ho to do this job easy and free ?
 
I would list all the files and output the listing to a text file.
Either use the dir command with them /s switch plus other switches until you get each file including path on its own line, or something like Agent Ransack.

Then take your text file and "manipulate" that to create a batch file of Copy commands.

While RegEx is the obvious answer for the manipulation, Excel would be easy easier if you've never used RegEx.

In Excel basically open and use various formulas to find the position of the last slash off the filepath name to get the filename only.

Then create a copy command from that.

Max path length errors shouldn't be a concern if you are removing the subfolders provided your target folder isn't very deep.
 
Last edited:
also we need to copy the long path name files automatically without having to shortening it every time we have the long pathname message .

Change this Regkey to increase the path length, Enable Long Paths in Windows 10, Version 1607


Code:
New-ItemProperty -Path "HKLM:\SYSTEM\CurrentControlSet\Control\FileSystem" `
-Name "LongPathsEnabled" -Value 1 -PropertyType DWORD -Force
 
I would refer that " increasing Windows path limit" Not recommended as a general solution due to potential security risks , Also some manual or scrpting can be time-consuming or require additional tools (like Excel or registry editing).
Syncabck Pro and GS RichCopy360 seem like a more streamlined solution specifically designed for file copying tasks.
 
Back
Top Bottom