-2

I am trying to get the files to delete after archiving them via cmd. This is possible as shown in the video here Video But i cannot find anything saying how to do this via cmd. theres documentation on it here Link And this is code i have so far

"cd C:\Users\Jorden\Desktop && "C:\Program Files\WinRAR\WinRAR.exe" a -r -pMyPassword MyArchiveFile *.txt"
Sterling Archer
  • 22,070
  • 18
  • 81
  • 118
  • WinRAR is installed with a help. It is opened by starting WinRAR and clicking in menu __Help__ on item __Help topics__. The first tab __Contents__ contains the list item __Command line mode__ with a reference to page *Command line syntax* to use as template on writing a WinRAR command line. __Commands__ - *Alphabetic commands list* helps to select appropriate command. And __Switches__ - *Alphabetic switches list* helps to find out which switches to use for a specific task. So there is no need to watch videos or ask other people to build a WinRAR command line. You just have to read the help. – Mofi Mar 22 '19 at 07:19

1 Answers1

1

From WinRar documentation (https://documentation.help/WinRAR/HELPSwDF.htm)

Switch -DF - delete files after archiving

Norcino
  • 5,850
  • 6
  • 25
  • 42
  • It would have been better to write a comment as I have done explaining where to find appropriate information in help of WinRAR. Even better would be using WinRAR command `m` instead of `a` to move files into an archive. – Mofi Mar 22 '19 at 07:22