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, 2:28 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 63598 times)

Grorgy

  • Supporting Member
  • Joined in 2007
  • **
  • default avatar
  • Posts: 821
    • View Profile
    • Donate to Member
Re: How to duplicate a file in the same folder?
« Reply #25 on: April 20, 2009, 05:39 PM »
I was just playing with lopesoft's file menu tools, and it has an option to duplicate files in same folder

Duplicate Files    files of any type and folders    Creates a new copy of the selected elements in the current folder.

http://www.lopesoft.com/en/index.html

It has a lot of other stuff you may not want to, but...

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 #26 on: April 21, 2009, 09:30 PM »
Trying to run ThePropagator.exe results in an error message

2009-04-22_102246.jpg

The script doesn't do a thing either.

BTW, I was trying to run another script of yours, MaimThatFile.ahk, and got this error message:

2009-04-22_102827.jpg

I have installed the latest version of Autohotkey but that did not make any difference.

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 #27 on: April 21, 2009, 10:05 PM »
The script doesn't do a thing either.
BTW, I was trying to run another script of yours, MaimThatFile.ahk, and got this error message:
That Target guy sure has a weird sense of humour!

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 #28 on: April 21, 2009, 11:16 PM »
dunno what's happening there, though I was on the bus when I compiled it - I've recompiled it, tested it, tested it again, and re-attached it fyi

my bad with maim that file - the icon was in the previous attachments (which I've removed - the last post wasn't an update, only a check to make sure chris was using the same version as me).  I've attached a zipped bundle and a compiled version, so have another go and let me know how you get on
« Last Edit: April 22, 2009, 01:33 AM 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 #29 on: April 22, 2009, 06:30 AM »
@Target
Haven't looked at this one before.
When I run it, neither a tray icon nor a 'drop box' appears.
I don't have a Win key to try so I'll look in the script later to change that.
Also, I use DirOpus so I'll have to revert to hExplorer, in order to jinx my system sufficiently.
At the moment I'm having to work for a crust... that'll be the fifth day this month!
Since usually (when I do so) I do this from home, I don't have long leisurely bus rides during which to play with software.


@PhilB66
MaimThatFile works just fine for me.
I was unable to make one version work, until I deleted every single thing related to it and started from scratch with the latest variant.
Perhaps that will help in your case, also.

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 #30 on: April 22, 2009, 11:52 AM »
@Target
(I did not change Win+V)
Relying only on Explorer.exe:
  • No drop target appears
  • F12 does nothing
  • Crlt-alt-x kills it propoly.

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 #31 on: April 22, 2009, 12:58 PM »
@Target
(I did not change Win+V)
Relying only on Explorer.exe:
  • No drop target appears
  • F12 does nothing
  • Crlt-alt-x kills it propoly.

-cranioscopical (April 22, 2009, 11:52 AM)
ditto

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 #32 on: April 22, 2009, 01:00 PM »
@PhilB66
MaimThatFile works just fine for me.
I was unable to make one version work, until I deleted every single thing related to it and started from scratch with the latest variant.
Perhaps that will help in your case, also.

-cranioscopical (April 22, 2009, 06:30 AM)

Thanks, will redownload the script.

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 #33 on: April 22, 2009, 01:04 PM »
I was just playing with lopesoft's file menu tools, and it has an option to duplicate files in same folder
Thanks for the suggestion Grorgy, but the last thing I want is to clutter my right-click context menu.

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 #34 on: April 22, 2009, 01:08 PM »
Free to use for how long it does not say.
It claims to be shareware, but I don't see any limits.

Thanks for the link cmpm. It has a 45-day evaluation period.

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 #35 on: April 22, 2009, 08:08 PM »
can you guys run the attached window spy for me and tell what the AHK class is for your versions of explorer please

[attachthumb=#2][/attachthumb]

at the moment it's set up to run with "ExploreWClass" and this works on all the PC's I've tried it on (all XP SP2 machines)

If your explorer window isn't active, or it doesn't match the above, then nothing will happen

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 #36 on: April 22, 2009, 08:40 PM »
can you guys run the attached window spy for me and tell what the AHK class is for your versions of explorer please
 (see attachment in previous post)
at the moment it's set up to run with "ExploreWClass" and this works on all the PC's I've tried it on (all XP SP2 machines)

Ah!  Here's the thing. I dumped the Propagator into a temp folder and stuck a shortcut onto my desktop:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
Program Manager
ahk_class Progman


So, having read this, I launched explorer and navigated with it to the temp folder and fired off the ahk script from there:
>>>>>>>>>>( Window Title & Class )<<<<<<<<<<<
F:\RAM\Props
ahk_class ExploreWClass


Et voila, procreating bunnies!

Apologies for the unwarrented failure but now I'm lapin it up.

So, make it work from a shortcut?



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 #37 on: April 22, 2009, 09:15 PM »
well, that's rather bizarre - duplicated your methodology and it's working, but it's a bit spotty

it appears to intermittently fail to detect the explorer window, or it does (there is a momentary flash of the drop target) but loses it again almost immediately

I'll have a bit a game and see if I can work it out (thanks for the feedback!!)
 

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 #38 on: April 22, 2009, 11:43 PM »
OK, I think I may have worked it out

it's a very minor change, but try it and let me know

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 #39 on: April 23, 2009, 03:06 AM »
OK, I think I may have worked it out

it's a very minor change, but try it and let me know


Nada.

Window Spy screenshot:

2009-04-23_160422.jpg

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 #40 on: April 23, 2009, 03:15 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.

bump.jpg

Also, could you add a "Duplicate to" feature (similar to "Copy to" and "Move to" functionality)?

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 #41 on: April 23, 2009, 07:37 AM »
OK, I think I may have worked it out
it's a very minor change, but try it and let me know

Nada.
Here's my experience:
  • Launch from desktop shortcut
  • Wait a bit (this is a technical term, don't worry if it's hard to grasp)
  • Nothing visible -- it's running
  • Open an explorer window -- drop target appears
  • F-12'd to set 15 copies
  • Dragged file from explorer window to drop target -- 15 copies created
  • Drop target invisible when explorer window loses focus or closed
  • Drop target visible when explorer window launched or gains focus
  • Can't move drop target around -- bounces back to start position (does anyone care about that?)
  • Drop target not 'on top' (does anyone care about that, either?)
  • Ctrl-Alt-x'd into oblivion
Do these bunnies have bugs?

Getting closer!

Anyone have a utility to expunge 15 unwanted copies?  ;D

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 #42 on: April 23, 2009, 09:17 AM »
Whoa.

Thanks for this cranioscopical. I can now confirm that the bunnies been reproducing like crazies...

2009-04-23_220838.jpg

Win+V doesn't work though.

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 #43 on: April 23, 2009, 10:03 AM »
Win+V doesn't work though.

For testing I changed the key to alt-V:
line 82 of script from $#V:: to $!V::
(I have no Windows key on my Northgate keyboards.)
That works fine for my test.

Method was:
  • launch Popogator
  • F-12 to set the number of desired instances
  • In explorer, select a file and either Ctrl-C it or context-menu copy it
  • Hit alt-V (or Winkey+V if you don't need to change the script)
  • Instant replication of file to the value set by F-12.

I know it's a hare-brained scheme but...



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 #44 on: April 23, 2009, 06:31 PM »
Window Spy screenshot:
 (see attachment in previous post)

What OS?  I assume it's Vista, and unfortunately I only have XP to work with so there could be other gotcha's like this.  I've updated the script to include the extra class, but you'll need to test it for me...

Also, could you add a "Duplicate to" feature (similar to "Copy to" and "Move to" functionality)?

I knew someone was going to ask for this...

I suppose I could, but how would you access this functionality? maybe different hotkeys, eg WIN+SHIFT+V to copy, WIN+CTRL+V to move...

  • Drop target invisible when explorer window loses focus or closed, and visible when explorer window launched or gains focus
  • Can't move drop target around -- bounces back to start position (does anyone care about that?)
  • Drop target not 'on top' (does anyone care about that, either?)
-cranioscopical (April 23, 2009, 07:37 AM)

  • the drop target window is destroyed whenever explorer is inactive, and recreated each time it is (active, that is...).  I did it this way to avoid have stray windows floating around (seemed perfectly logical to me, but what do I know :huh:)
  • Is this something you would like to be able to do?  I wondered about moving the drop target - logically it didn't seem to matter where it was so long as it wasn't over anything critical (and it's translucent anyway), and given that it will self destruct as soon as you click on it, that doesn't seem like too big an issue either.  I just thought about this a bit more and wondered whether or not some sort of pause functionality might be useful (not sure why, but maybe you guys have an idea)
  • not sure what you mean by 'not on top' - it is set to be 'on top', just not active (remember, if the focus goes away from the explorer window the drop target self destructs)

keep the feedback coming and we'll get there

launch Popogator
-cranioscopical (April 23, 2009, 10:03 AM)

don't know about hare brained, but I think I can see where some of your problems are coming from...

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 #45 on: April 23, 2009, 06:53 PM »
  • Drop target invisible when explorer window loses focus or closed, and visible when explorer window launched or gains focus
  • Can't move drop target around -- bounces back to start position (does anyone care about that?)
  • Drop target not 'on top' (does anyone care about that, either?)
-cranioscopical (April 23, 2009, 07:37 AM)

  • the drop target window is destroyed whenever explorer is inactive, and recreated each time it is (active, that is...)
  • I wondered about moving the drop target - logically it didn't seem to matter
  • not sure what you mean by 'not on top' - it is set to be 'on top', just not active
  • Makes perfect sense -- I didn't realize the subtlety of your design
  • Static suits me. Others might like it on the monitor screen from which it was initiated -- maybe not.
  • Didn't understand the destruction/recreation so thought it had been obscured by another window at that location

I think I can see where some of your problems are coming from...
-Target
You noticed!  Time to write the Poopograter

keep the feedback coming and we'll get there
-Target
It's been a long March here but it's all white to be late, Alice forgiven.

And no, I have no shame!


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 #46 on: April 23, 2009, 07:24 PM »
or the defecator...

It's been a long March here but it's all white to be late, Alice forgiven
i realise it's been a long March, but don't worry April be all right

I have no shame!

just to prove you've mastered the understatement...

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 #47 on: April 23, 2009, 07:56 PM »


It's been a long March here but it's all white to be late, Alice forgiven
i realise it's been a long March, but don't worry April be all right

I have no shame!

just to prove you've mastered the understatement...
;D

Hot keys don't work for me in the latest offering.
A press on F12 does nothing, but if I hold it down the script reports an inordinate number of hotkeys received.
Have you done anything that would affect that, or is this purely random?


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 #48 on: April 23, 2009, 08:22 PM »
Hot keys don't work for me in the latest offering.
A press on F12 does nothing, but if I hold it down the script reports an inordinate numbe
r of hotkeys received.

Went back one generation and then the hotkeys did work. Then I killed that and ran the newest version which took F12.
Bunnies were in their own window, no transparency. That window and the explorer window sat and refreshed over and over.
I could drag a file icon to the bunnies to get duplication but if I attempted to move the explorer window it jumped back to its original position,
so it looks as if you're locking in place the bunnies and the explorer window.

At one point I had open two explorer windows and the bunnies ran away.
Shy as they are, they re-emerged once one of the explorer windows was closed.

All this and I haven't even had a drink. This is the best game I've played all week  :)


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 #49 on: April 23, 2009, 08:59 PM »
Hot keys don't work for me in the latest offering.
-cranioscopical (April 23, 2009, 08:22 PM)

the hand is quicker than the I...

I amended the top of the script to included the new window class, but forgot about the hotkeys - I guess that'll learn me to concentrate on one thing at a time...

All this and I haven't even had a drink. This is the best game I've played all week  :)

I'm laughing and laughing and laughing (now if I could just stop gritting my teeth...)