https://github.com/keisku/dpfile
CLI that can duplicate up to 10,000 files. You can specify the name of the file to be replicated or number the files sequentially.
https://github.com/keisku/dpfile
Last synced: 3 months ago
JSON representation
CLI that can duplicate up to 10,000 files. You can specify the name of the file to be replicated or number the files sequentially.
- Host: GitHub
- URL: https://github.com/keisku/dpfile
- Owner: keisku
- Created: 2020-07-19T05:27:28.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2020-08-23T00:04:40.000Z (almost 5 years ago)
- Last Synced: 2025-02-05T08:51:07.508Z (4 months ago)
- Language: Go
- Homepage:
- Size: 179 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dpfile
[](https://github.com/kskumgk63/dpfile/issues)
[](https://github.com/kskumgk63/dpfile/network/members)
[](https://github.com/kskumgk63/dpfile/stargazers)dpfile is a file cloning tool. You can duplicate a file with any name and sequential number.
## Install
```
go get "github.com/kskumgk63/dpfile"
cd $GOPATH/src/github.com/kskumgk63/dpfile
go install
```## Usage
```
GLOBAL OPTIONS:
--src value, -s value path to the file you want to duplicate
--dst value, -d value path to the destination which the file will be duplicated (default: "./")
--filename value, -f value
--offset value, -o value -1 < offset (default: "0")
--limit value, -l value 0 < limit < 10001 (default: "1")
--help, -h show help (default: false)
``````
dpfile --src ./testdir/gopher.png
```output
```
./
├── gopher_duplicated.png
└── testdir
├── gopher.png
└── helloworld.txt
```---
```
dpfile --src ./testdir/helloworld.txt --dst ./testdir/
```output
```
./testdir
├── gopher.png
├── helloworld.txt
└── helloworld_duplicated.txt
```---
```
dpfile --src ./testdir/helloworld.txt --dst ./testdir/ --limit 10
```output
```
./testdir
├── gopher.png
├── helloworld.txt
├── helloworld_duplicated.txt
├── helloworld_duplicated1.txt
├── helloworld_duplicated2.txt
├── helloworld_duplicated3.txt
├── helloworld_duplicated4.txt
├── helloworld_duplicated5.txt
├── helloworld_duplicated6.txt
├── helloworld_duplicated7.txt
├── helloworld_duplicated8.txt
└── helloworld_duplicated9.txt
```---
```
dpfile --src ./testdir/helloworld.txt --dst ./testdir/ --offset 100 --limit 10
```output
```
./testdir
├── gopher.png
├── helloworld.txt
├── helloworld_duplicated100.txt
├── helloworld_duplicated101.txt
├── helloworld_duplicated102.txt
├── helloworld_duplicated103.txt
├── helloworld_duplicated104.txt
├── helloworld_duplicated105.txt
├── helloworld_duplicated106.txt
├── helloworld_duplicated107.txt
├── helloworld_duplicated108.txt
└── helloworld_duplicated109.txt
```---
```
dpfile --src ./testdir/gopher.png --dst ./testdir/ --filename mouse
```output
```
./testdir
├── gopher.png
├── helloworld.txt
└── mouse.png
```---
```
dpfile --src ./testdir/gopher.png --dst ./testdir/ --filename mouse --offset 999
```output
```
./testdir
├── gopher.png
├── helloworld.txt
└── mouse999.png
```