topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 8:30 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: How to duplicate a file in the same folder?  (Read 63603 times)

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
How to duplicate a file in the same folder?
« on: April 16, 2009, 08:44 PM »
Does anyone know a command (or a workaround) to duplicate a file in the same folder?

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #1 on: April 16, 2009, 08:49 PM »
if your working in explorer copy and paste (CTRL+C - CTRL+V) will generate 'copy of <insert your file here>'

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #2 on: April 16, 2009, 09:24 PM »
Thanks Target, but that will will rename the duplicate file to "Copy of ..." the source file. I guess I was not very clear about what I am looking for... Anyway, here's a screenshot:

2009-04-17_101407.jpg

What I want is to drop a file in a folder and get an option to duplicate the file, so I get something like this:

2009-04-17_102334.jpg

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #3 on: April 16, 2009, 09:32 PM »
Ok, you got me on that one

sadly I've got nothing that might help here...

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #4 on: April 16, 2009, 09:38 PM »
actually, what file manager do you use?

i've just been looking at this and it looks like it could be do-able

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #5 on: April 16, 2009, 09:40 PM »
Windows Explorer  :)

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #6 on: April 16, 2009, 09:59 PM »
thanks, I'll have a game..

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #7 on: April 16, 2009, 10:35 PM »
Thanks Target, but that will will rename the duplicate file to "Copy of ..." the source file. I guess I was not very clear about what I am looking for... Anyway, here's a screenshot:
 (see attachment in previous post)
What I want is to drop a file in a folder and get an option to duplicate the file, so I get something like this:
 (see attachment in previous post)

Hope I'm not butting in, but this can be sort of done with any script, here's an AHK:
Code: AutoIt [Select]
  1. ; Script to duplicate a file with current date
  2. dateString := A_YYYY . "-" . A_MM . "-" . A_DD
  3. Loop %0%  ; For each parameter (or file dropped onto a script):
  4. {
  5.     SourcePath := %A_Index%  ; Fetch the contents of the variable whose name is contained in A_Index.
  6.     SplitPath, SourcePath, OutFileName, OutDir, OutExtension, OutNameNoExt, OutDrive
  7.     DestinationPath := OutDir . "\" . OutNameNoExt . "_" . dateString . "." . OutExtension
  8.    
  9.     FileCopy, %SourcePath%, %DestinationPath%, 1
  10. }

I've also attached a compiled version that you can put into your "Send To" directory.

Does that do it?


PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #8 on: April 17, 2009, 12:26 AM »
Hope I'm not butting in
-Perry Mowbray (April 16, 2009, 10:35 PM)

Not at all. Appreciate your help, but still waiting to see what Target has in store (no pun intended).

I've also attached a compiled version that you can put into your "Send To" directory.

Does that do it?
-Perry Mowbray (April 16, 2009, 10:35 PM)

Yes, it does, but what if I want several duplicates? Is it possible to both stamp and number the files?

Also, I much prefer a drag and drop method where I could process multiple files at once, if possible.

Thanks again for your help.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #9 on: April 17, 2009, 12:58 AM »
still waiting to see what Target has in store
me too...

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #10 on: April 17, 2009, 01:54 AM »
I've also attached a compiled version that you can put into your "Send To" directory.

Does that do it?
-Perry Mowbray (April 16, 2009, 10:35 PM)

Yes, it does, but what if I want several duplicates? Is it possible to both stamp and number the files?

Also, I much prefer a drag and drop method where I could process multiple files at once, if possible.

Well it can do anything you want it to  :)

I only added date as that was what you had in your screenshot.

You can drag multiple files onto the compiled version (or a shortcut to the exe). If you put it into your Send To directory you can multi-select too.

I'm happy to make a change to the script: just tell me what you want tagged on the end

Perry Mowbray

  • N.A.N.Y. Organizer
  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 1,817
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #11 on: April 17, 2009, 01:55 AM »
Yes, it does, but what if I want several duplicates? Is it possible to both stamp and number the files?

Date - Time??

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #12 on: April 17, 2009, 03:57 AM »
Yes, it does, but what if I want several duplicates? Is it possible to both stamp and number the files?

Date - Time??
-Perry Mowbray (April 17, 2009, 01:55 AM)

Yes, that would be great. Also, could you add a path to icon in the script so I could add an icon and compile it.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #13 on: April 18, 2009, 06:43 AM »
try this - The Propogator

creates copies of copied files within the same folder - files can be copied using the keyboard (CTRL+C) or drag and drop (onto the drop target).  User can select the number of iterations (F12 to bring up the dialog)

File name format is FILENAME_YYYY-MM-DD_ITERATION (ie file test.txt would become TEST_2009-04-18_1.txt.  The iteration increases for each successive copy)

to use the keyboard I went with WIN+V instead of CTRL+V - this is close enough to be usable, but avoids any potential issues with other copy/paste operations

and it ONLY works with windows explorer at the moment

I've also written it so there's no icons so it shouldn't get in the way (it's effectively invisible so if you put in your startup directory it'll run in the background)

let me know how it goes   

EDIT: removed old attachments
« Last Edit: April 19, 2009, 08:46 PM by Target »

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #14 on: April 18, 2009, 09:35 AM »
If you shore a door shouldn't you prop a gate?  ;)

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #15 on: April 18, 2009, 06:00 PM »
If you shore a door shouldn't you prop a gate?  ;)
-cranioscopical (April 18, 2009, 09:35 AM)
I think you've become unhinged, but point taken

an update, as I realised I had omitted a necessary ICO file (and because the icon I did for the compiled version looked like carp...)

EDIT: removed old attachments
« Last Edit: April 19, 2009, 08:45 PM by Target »

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #16 on: April 18, 2009, 06:42 PM »
the icon I did for the compiled version looked like carp...
Don't be koi.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #17 on: April 18, 2009, 07:13 PM »
you're fishing...

cranioscopical

  • Friend of the Site
  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,776
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #18 on: April 18, 2009, 07:47 PM »
you're fishing...
...and you took the bait; hook, line, and stinker!

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #19 on: April 18, 2009, 09:54 PM »
let me know how it goes   

It doesn't.

I did see the "dropzone" area the first time I ran The Propogator, but it was flickering like hell. Dropping a file on the "Target" did the job, but Winkey + V and F12 did not do a thing. Also, when The Propogator is running, I cannot move windows around. Alt+Ctrl+X works fine.

Now, nothing is happenig. I mean, the script is running, but that's about it.

I have a dualscreen setup, if that's of any help.

Here's a fun image for The Propogator:

multiply_icon_thumb.gif

CleverCat

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 1,164
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #20 on: April 19, 2009, 03:06 AM »
The bunnies are perfect for the programme!  ;D

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #21 on: April 19, 2009, 07:35 PM »
I did see the "dropzone" area the first time I ran The Propogator, but it was flickering like hell. Dropping a file on the "Target" did the job, but Winkey + V and F12 did not do a thing. Also, when The Propogator is running, I cannot move windows around. Alt+Ctrl+X works fine.

Now, nothing is happenig. I mean, the script is running, but that's about it.


that's interesting - works fine on my (work) laptop, though the drop zone image wouldn't render on my desktop at home (both are XP SP2).

Sadly i don't have access to a dual screen setup for testing (just in case this has any relevance)

I'll go through it again though, and incorporate your graphic for the drop zone (graphics is not one of my strong points...)

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #22 on: April 19, 2009, 08:44 PM »
updated - I'd made some (STUPID!!) spelling mistakes

At this stage I think it will only work on your primary monitor - I need to do some more study if it's going to work across multiple monitors

EDIT: redundant attachments deleted
« Last Edit: April 20, 2009, 05:30 PM by Target »

cmpm

  • Charter Member
  • Joined in 2006
  • ***
  • default avatar
  • Posts: 2,026
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #23 on: April 20, 2009, 07:22 AM »
This can do what you want possibly.
It worked for me anyway.
Free to use for how long it does not say.
It claims to be shareware, but I don't see any limits.
The other one I found was FileMaker Pro-not free.

http://www.annoyance...g/exec/software/cept

http://www.creativel...ment.com/powertools/

Adds commands for right clicking a file.
There's more then 1 command to choose from after this installs.

'Power Rename' is the one I used to duplicate a file in the same folder with a time stamp.

Target

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 1,832
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #24 on: April 20, 2009, 05:30 PM »
another update as I was playing with it this morning and noticed the compiled version wasn't playing to the rules

took me a while to realise that the window titles were changing when I compiled the script (DOH!!)