albino98 / CLI-Copy

A command line program to copy files and folders according to Xml configuration files.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Python

CLI-Copy

A command line program to copy files and folders according to Xml configuration files.

A cli version of Deploy-Helper .

The program also backs up the destination folder before copying.

Usage

  1. Clone repository or download files into a folder.

  2. Configure an xml file like following:

<xml>
	<deploys>
		<deploy name="testFile">
			<sourceFilePath>/home/folder</sourceFilePath>
			<sourceFilePath>/home/testFile.txt</sourceFilePath>
			
			<destinationPath>/home/destination</destinationPath>
			<backupPath>/home/backup</backupPath>
		</deploy>
	</deploys>
</xml>
  1. Open cmd in the program folder and run:
 python3 main.py -d <xmlFileName>

or

 py main.py -d <xmlFileName>

example:

 python3 main.py -d testFile

⚠️ Save the xml file with the same name as the deploy attribute. Example:

<deploy name="testFile">

File name: testFile.xml

About

A command line program to copy files and folders according to Xml configuration files.

License:MIT License


Languages

Language:Python 100.0%