Shantz Copy Basket

My Sites: My Blog | My Tech Blog | Follow me on Twitter
----

download

Download: shantz-cp-linux
Version: 1.0.0
Updated: April 23, 2008
Size: 1.15 MB
Hits: 48

download

Download: shantz-cp-windows
Version: 1.0.0
Updated: April 23, 2008
Size: 1.34 MB
Hits: 60

download

Download: shantz-cp.pl
Version: 1.0.0
Updated: March 28, 2008
Size: 7.42 KB
Hits: 116

Introduction:

I’m sure you have copied/moved files on your computer from one place to another. And I’m sure often you have to do more than just “single-shot” copying that is copy a few files to one place, move a few to another, and copy yet some more to one more location. Well, I had to do this quite a few times (e.g. I ran out of disk space recently on a partition and had to empty out my “Movies” and “Songs” folders to move a few movies/songs each to all other partitions/disks according to the space available). Hence, I wrote this little command line program, which behaves like a basket.

You can put any number of files from any number of different locations into it in a single shot. It will store their locations and give them an ID. Now, you can copy/move those files to differnet destinations based on their IDs. What's even better is that your basket will remain intact even across reboots. So, you can continue working on the files in the basket even for days.

Requirements:

The program is multi-platform compatible as I wrote it in Perl and took care of using portable methods only. So, if you have perl installed, you can just download the above perl file and install “File-Copy-Recursive” Module (rest are most probably installed already) and you are good to go.

For people who don’t have perl, I’ve uploaded the stand-alone packages for windows as well as linux users. Download according to your platform and you can use them straight away without any hassles.

For the record, I tested this script as well as the executables on Windows XP SP2 and Ubuntu Feisty Fawn 7.04.

Usage:

shantz-cp [OPTION] [FILE] [DESTPATH]

Options:
-l, --list List files in the basket.
Doesn't take [FILE]/[DEST] Arguments
-a, --add Add file(s) to the basket.
Provide absolute/relative path of file(s) as argument
-r, --remove Remove file(s) from the basket
Provide absolute/relative path of file(s) as argument
-ri, --removeid Remove file(s) from the basket using their basket id
Provide id(s) of file(s) as argument
-pi, --pasteid Paste a file from the basket to the given destination
Provide file id(s) to be pasted followed by relative/absolute path of destination
-m, --move Use this option along with paste option to move the files instead of copy

Arguments:
[FILE] Any number of files can be mentioned
Paths can be relative to current dir or absolute
Cannot use with list option
[DESTPATH] Only 1 path can be given
Path can be relative to current dir or absolute
Can be used only with paste option

Notes:
1. Only 1 option can be used at a time, except for the "move" and "pasteid" combinations
2. For any queries/help/updates, please post a comment here.

Examples:

CODE:
  1. shantanu@wtf:~/stuff$ ./shantz-cp -a *
  2. File /home/shantanu/stuff/conky.sh already exists at ID 1
  3. File /home/shantanu/stuff/hosts.txt already exists at ID 0
  4. File /home/shantanu/stuff/movie2mobile.py already exists at ID 2
  5. Added /home/shantanu/stuff/places_menu.txt at ID 3
  6. Added /home/shantanu/stuff/rapt at ID 4
  7.  
  8. shantanu@wtf:~/stuff$ ./shantz-cp -l
  9. No of files in basket: 5
  10. File ID. 0: /home/shantanu/stuff/hosts.txt
  11. File ID. 1: /home/shantanu/stuff/conky.sh
  12. File ID. 2: /home/shantanu/stuff/movie2mobile.py
  13. File ID. 3: /home/shantanu/stuff/places_menu.txt
  14. File ID. 4: /home/shantanu/stuff/rapt
  15.  
  16. shantanu@wtf:~/stuff$ ./shantz-cp -ri 2
  17. Removed /home/shantanu/stuff/movie2mobile.py from basket
  18.  
  19. shantanu@wtf:~/stuff$ ./shantz-cp -pi 1 3 temp/
  20. Copied /home/shantanu/stuff/conky.sh to /home/shantanu/stuff/temp/
  21. Copied /home/shantanu/stuff/places_menu.txt to /home/shantanu/stuff/temp/
  22.  
  23. shantanu@wtf:~/stuff$ ./shantz-cp -m -pi 0 /home/shantanu
  24. Moved /home/shantanu/stuff/hosts.txt to /home/shantanu/


----
If you liked this post, then you can Subscribe to my feed
Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • blogmarks
  • IndianPad
  • StumbleUpon
  • Technorati
  • Facebook
  • Live
  • Reddit
  • Slashdot
  • YahooMyWeb
  • e-mail

Related posts

3 Responses to “Shantz Copy Basket”

  1. Shantanu Goel Says:

    The Windows File is coming soon tonight. I am on linux right now and have to regenerate the windows executable. Will do it tonight.

  2. Project: Shantz Copy Basket (Compatible with linux as well as windows) | My Technophilic Musings Says:

    [...] Shantz Copy Basket [...]

  3. Shantanu Goel Says:

    Uploaded the windows version. Sorry for the delay. Didn't find the time to boot up into windows and generate the exe.

Leave a Reply