Batch script to: create, record, archiving

Discussion forum for all Windows batch related topics.

Moderator: DosItHelp

Post Reply
Message
Author
John Doe
Posts: 1
Joined: 29 Jan 2022 10:01

Batch script to: create, record, archiving

#1 Post by John Doe » 29 Jan 2022 10:16

Hello everyone! Could you, guys, help with this bath script:
  1. Creates in the current directory (in which the bat-file is located) a directory"Screenshots_current_date" and moves there from the current directory all files with the extension specified as the first parameter passed from the command line.
  2. Writes the names of all moved files to the d:\screenshots.found file (appends to the end of the file or creates a new one if there was none), which is located in the same directory as a launched batch file.
  3. Archives a folder with the moved files and deletes its original.
  4. Waiting for any key to be pressed to complete.
Thanks!
Last edited by Squashman on 29 Jan 2022 12:03, edited 1 time in total.
Reason: MOD EDIT: please format your posts for readability.

ShadowThief
Expert
Posts: 1166
Joined: 06 Sep 2013 21:28
Location: Virginia, United States

Re: Batch script to: create, record, archiving

#2 Post by ShadowThief » 29 Jan 2022 11:56

This sounds like homework, so I'll be vague.
1.Creates in the current directory (in which the bat-file is located) a directory"Screenshots_current_date" and moves there from the current directory all files with the extension specified as the first parameter passed from the command line.
mkdir /?
move /?
2.Writes the names of all moved files to the d:\screenshots.found file (appends to the end of the file or creates a new one if there was none), which is located in the same directory as a launched batch file.
for /?
3.Archives a folder with the moved files and deletes its original.
tar --help
4. Waiting for any key to be pressed to complete.
pause /?

Post Reply