Copying Compressed Files  


  1. Posts : 64
    Windows 10 Home 64-bit version 21H2 build 19044.1415
       #1

    Copying Compressed Files


    Greetings,

    I already tried asking this in Microsoft Answers.

    I would like to use the compact command before copying files to an external drive. However, I've run into two problems:

    First, it seems that Windows automatically decompresses files before copying them, and tries to compress them again at the destination.

    Second, my external drive doesn't support NTFS. I think it might be using the EXT4 file system.

    Is it possible to compress files before copying them to a backup drive?

    Thanks,
    Shane.
      My Computer


  2. Posts : 13,136
    Win10 Version 21H2 Pro and Home, Win11 Pro and Home
       #2

    The ext4 format is for Linux.

    Do the compressed files have the extension of .zip?

    Should be able to copy to NTFS or exFAT formatted drives without having to allow the decompression, I do it between internal drives and USB drives or NAS drives.

    If the files are over 4GB they can't be copied/moved to FAT32 drives such as USB Thumb drives, it's a limit of FAT32 for file size and the drive has to be formatted by a different means to get FAT32 formatting over 32GB. Most such Thumb drives are factory formatted as FAT32, at least up to the 64GB types I have, haven't needed larger yet.

    There are 2 ways I get larger drives as FAT32, one is the GPARTED LiveCD download file to create the bootable drive and the other is a version of Linux which may come with the same program, Linux Mint does.

    Yes, you can compress them before copying. But it's possible compacting and compressing are a bit different. The .zip format is common with WinZip or the older PKZip and File Explorer does support the format.
      My Computers


  3. Posts : 28,383
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #3

    Shanester said:
    First, it seems that Windows automatically decompresses files before copying them, and tries to compress them again at the destination.

    Yes, that is the way ntfs file compression works. A compressed file is decompressed as it is read. If the folder it is being copied to is on an ntfs partition and is an ntfs compressed folder, then the file will be compressed as it is written. If the destination folder is not compressed, neither will the copied file be.

    Second, my external drive doesn't support NTFS. I think it might be using the EXT4 file system.
    Is it possible to compress files before copying them to a backup drive?

    EXT4 is a file system used by Linux. Windows does not support EXT4. There are 3rd-party apps that allow Windows to read EXT4 drives, but they do not provide write access.

    The only practical way to copy a file in compressed form is to put it into a .zip archive (or .7z, or .similar) before copying it across to another drive.
      My Computers


  4. Posts : 64
    Windows 10 Home 64-bit version 21H2 build 19044.1415
    Thread Starter
       #4

    Berton said:
    Do the compressed files have the extension of .zip?
    The compact command doesn't change the file extension.
    Berton said:
    But it's possible compacting and compressing are a bit different.
    What's the difference between compacting and compressing?
    Bree said:
    The only practical way to copy a file in compressed form is to put it into a .zip archive (or .7z, or .similar) before copying it across to another drive.
    Can this be done in the Windows command line?

    Thanks,
    Shane.
      My Computer


  5. Posts : 28,383
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #5

    Shanester said:
    Can this be done in the Windows command line?
    Windows has no native zip utility available at the command line. 3rd-party utilities like 7-Zip can be run from the command line. There is a Powershell cmdlet Compress-Archive. Powershell commands can be used at the command line by putting POWERSHELL followed by a space before the command string.

    https://docs.microsoft.com/en-us/pow...w=powershell-7
      My Computers


  6. Posts : 11,247
    Windows / Linux : Arch Linux
       #6

    Shanester said:
    Greetings,

    I already tried asking this in Microsoft Answers.

    I would like to use the compact command before copying files to an external drive. However, I've run into two problems:

    First, it seems that Windows automatically decompresses files before copying them, and tries to compress them again at the destination.

    Second, my external drive doesn't support NTFS. I think it might be using the EXT4 file system.

    Is it possible to compress files before copying them to a backup drive?

    Thanks,
    Shane.
    Hi there
    @Shanester
    @Bree

    I don't know about this in Windows (some type of FTP program might have this feature in it but it CAN be done in Linux really easily


    As far as compression goes just if you mount the Windows drive on the system and copy it with rsync -z the system will COMPRESS files BEFORE transfer and DECOMPRESS them afterwards -- this really speeds things up if doing this over a LAN.


    On Linux to read / write NTFS files ensure package ntfs-3g is installed. Fat32 already works without problem.
    Another way is to ensure SAMBA is active then the Windows files can be shared / mounted on Linux and files read / written both ways as Network drives. you can still use rsync -z on the linux system to backup the files --there's a nice GUI package for this called grsync too.

    ark is also a program that handles all sorts of archives and there's gzip and all sorts of other things on Linux.

    Cheers
    jimbo
      My Computer


  7. Posts : 64
    Windows 10 Home 64-bit version 21H2 build 19044.1415
    Thread Starter
       #7

    Bree said:
    Windows has no native zip utility available at the command line.
    I think the difference between NTFS compression and zipping is that zipping always creates an archive. Is this correct?

    Shane.
      My Computer


  8. Posts : 28,383
    10 Home x64 (22H2) (10 Pro on 2nd pc)
       #8

    Shanester said:
    I think the difference between NTFS compression and zipping is that zipping always creates an archive. Is this correct?
    Yes, correct. A zip file is always an archive that has to be opened to see the files it contains, File Explorer treats it much like a folder. The ntfs compression makes a file that to all intents and purposes is still the same file, just occupying less disk space. It is decompressed on the fly as you open it and, if it is a document, compressed on the fly as you save it.
      My Computers


 

  Related Discussions
Our Sites
Site Links
About Us
Windows 10 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 10" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd
All times are GMT -5. The time now is 13:46.
Find Us




Windows 10 Forums