The VX-Files
The VX-Files
  • README.txt
  • For updates, questions, suggestions or just chatting: @malcrvz
  • Download your own local copy or check my other libre projects: Github/malcrvz
  • 📕Cybersecurity Theory
    • Index
      • Malware types
        • Viruses, worms and Trojans
        • Backdoors, Rootkits and Spyware
        • Botnets, DDoS and Spammer
        • Ransomware
        • Scareware and Adware/PUP/PUA
        • Downloaders and Launchers
        • Hacktool
        • APT - Advanced Persistent Threat
      • Social engineering techniques
        • Phishing
        • Pretexting
        • Baiting
        • Quid pro quo
        • Tailgating
      • Cryptography
        • Hash functions
        • Symmetric, Asymmetric and Hybrid cryptography
        • Digital signatures & Digital certificates
        • TLS Protocol
      • Pentesting methodology & Techniques
        • CIA Triad - Confidentiality, Integrity & Availability
        • The methodology steps
        • Pre-Engagement
        • Information Gathering
          • HTTP status codes
          • robots.txt
        • Vulnerability Assessment
        • Exploitation
          • Password cracking
        • Post-Exploitation & Persistence
          • Types of Shells
        • Privilege Escalation & Lateral Movement
        • Reporting & Remediation
  • 🐧Linux Essentials
    • Index
      • 1, 0, bits, Bytes: Units of digital information
      • User management
      • Packet management
      • Privileges & sudo
      • Passwd & Shadow files
      • Managing files, links and regex
      • find
      • Terminal/TTY
      • SSH
  • 🪟Windows Essentials
    • Index
      • CLI user management
      • CMD File management
  • 🌍Networking Essentials
    • Index
      • Windows CLI IP management
      • Linux IP management
      • Linux CLI Wi-Fi connection
  • 🕸️Network Pentesting
    • Tools
      • 1. Pre-Engagement
        • OpenVPN
      • 2. Information gathering
        • cURL & wget
        • Nmap
        • arp
        • Netcat
        • whatweb
      • 3. Vulnerability assessment
        • smbclient
      • 4. Exploitation
        • Metasploit
        • Hashcat
        • John the Ripper
      • 5. Post-Exploitation & Persistence
        • SSH
      • 6. Privilege escalation & Lateral movement
        • Possible privilege escalation vectors - Auto-enumeration scripts
      • 7. Reporting & Remediation
    • Techniques
      • Upgrade reverse shell to interactive
      • Transferring files to/from remote victim
      • Possible privilege escalation vectors - Manual checklist
    • Resources
      • Manufacturer default passwords lists
        • IP Cameras
      • Get Shells
  • 💉Web App pentesting
    • Tools
      • CeWL
      • Gobuster
      • whatweb
    • Techniques
      • Command injection
    • Resources
      • Reverse Shells
      • Bind Shells
  • 📡Wireless pentesting
    • Tools
    • Techniques
    • Resources
  • 🔓On-Premises Pentesting
    • Tools
    • Techniques
      • Removing Linux user passwords
      • Removing Windows user passwords
    • Resources
  • 💽Disks & Forensics
    • Index
      • Getting a disk ready
      • Inodes & Sectors
      • Recover deleted files
      • BUILDING - Secure file deletion
  • 🕷️Bash scripts
    • coming soon
  • ⚡PowerShell Scripts
    • coming soon
  • 🟩HTB Walkthroughs
    • coming soon
  • 🏴‍☠️External Resources
    • Schools
    • Books & Wikis
    • Utilities
    • Interactive cheat sheets
    • Wordlists
Powered by GitBook
On this page
  1. Windows Essentials
  2. Index

CMD File management

#File
fsutil file createNew file1 n    #Creates new file1 with n number of bytes  ?To create the pre-defined size it uses invisible characters, you can delete them
fsutil file layout file1         #Gives detailed info about the file

copy file1 C:\destiny_directory    #Copies the file into the specified directory
xcopy directory1 new_directory     #Copies directory and only the files inside (no subdirectories)
xcopy /S directory1 new_directory  #Copies recursively, files and subdirectories and its files
xcopy /E directory1 new_directory  #Same as /S but includes empty directories too
xcopy /I                           #If specified destiny doesn't exist, it supposes its a directory and creates it
xcopy /W                           #Asks user for confirmation pressing a key before copying
xcopy /P                           #Asks confirmation (Y/N) for each file is going to copy
xcopy /L                           #Prints what would be copied if executed, but doesn't copy, needs to be removed before

#Copy multiple files in different folders
for %i in ("dir1\file1.txt" "a\b\c\file.pdf" "dir2\file3.csv") do copy %i Destiny\
#mkdir/md
mkdir directory1        #Creates directory1 in current directory
mkdir a\b\c             #Creates recusirsive directories, c inside b inside a
dir             #Prints files and folders in current directory
dir /A          #Prints all types of files and folders in current directory
dir /A:D        #Prints only folders
dir /A:H        #Prints hidden files and folders
dir /A:-D       #Prints only files ("-" minus directories)
dir /O          #Prints files and folders sorted alphabetically
dir /O:S        #Prints files and folders sorted by size smallest to largest
dir /O:-S       #Prints files and folders sorted by size largest to smallest
dir /B          #Prints only the names of files and folders

#Pipeline examples
dir /B | sort   #Sorts in alphabetical order the input from dir /B
dir /B | sort /R /O file.txt    #Sorts the input in reverse order and saves the output into a file
notepad file.txt     #Check file just created
move c:\folder1\file1.txt c:\folder2  #Move file1 to folder
tree         #Prints the directory structure of current folder
tree /F      #Prints the directory structure and the files inside each
rm file1                 #Removes file

Last updated 1 year ago

🪟