Cinchoo / ChoEazyCopy

Simple and powerful RoboCopy GUI
MIT License
1.76k stars 119 forks source link

Directory is mirrored correctly but *.txt; *.pdf, and *.rtf files are empty #54

Open g-topix opened 2 years ago

g-topix commented 2 years ago

My attempt to copy a directory with subdirectories and .txt; .pdf and .rtf files and simultaneously ignore all larger files (.exe; .rar; .msi) over 5000 bytes works only partially. The directory structure is copied correctly, but the contents of the .txt; .pdf, and *.rtf files are not present. These copied files remain empty with 0 kb.

What am I doing wrong?

Name Microsoft Windows 7 Professional Version 6.1.7601, NET Framework 4.8

Applied parameters:

`*:\NewBackup\DoInstall_Programms\ChoEazyCopy\ChoEazyCopy v2.0.0.1>prompt $G

RoboCopy.exe ":\NewBackup\DoInstall_Programs" ":\NewBackup\DoInstall_ChoEazyCopyList" . /E /LEV:3 /COPY:DAT /SECFIX /TIMFIX /MIR /A+:A /CREATE /IA:ACE /XA:C /MAX:5000 /V /TS /BYTES /LOG:"*:\NewBackup\DoInstall__ChoEazyCopyList" /LOG+:"ChoEasyCopyLog" /NJH

Log: *:\NewBackup\DoInstall__ChoEazyCopyList

exit`

In other words, I want to copy only the directory structure including the text, PDF and RTF files in it. All other file formats should not be copied. How can this be done?

GhostCoder0 commented 3 months ago

From robocopy /?

/CREATE :: CREATE directory tree and zero-length files only.

The /CREATE option is causing this.

GhostCoder0 commented 3 months ago

here's a simplified command to do what you described:

robocopy "X:\NewBackup\DoInstall_Programs" "X:\NewBackup\DoInstall_ChoEazyCopyList" *.txt *.pdf *.rtf /E

simply replace the drive letter, I put X: here as a placeholder.

/E is telling robocopy to include every subfolders, even empty ones.