Create Folder while copy/move?

HellO to you all, :slight_smile: :slight_smile:
thanks for all the feedback. Everything seems be working fine.

Wel eh ... one last thing issue though.
The 'MOVE' - thing..

rem BEGIN BATCH FILE
@echo off
dopusrt /cmd CreateFolder %1
set DST=%1
:loop
shift
if {%1}=={} exit
dopusrt /cmd MOVE %1 TO %DST%
goto:loop
rem END BATCH FIL

when executhing this one, I am getting an pop-up error
"Cannot find MOVE...etc"

Any suggestions how to solve this?

Thank you!
brgds

Make that:

dopusrt /cmd COPY MOVE %1 TO %DST%

There is no 'move' command, you need to use 'copy move'.

Something different. I might be missing the point, but I'm using the following script:

sync: dopusrt /cmd clipboard cut
sync: dopusrt /cmd createfolder "{dlgstring|Specify folder name where selected files should be moved to}" readauto
sync: dopusrt /cmd clipboard paste
sync: dopusrt /cmd go up

It cuts all selected files, asks for a directoryname and pastes the files. Ok, so it doesn't look too good, DOpus will need to read the newly creadted directory in the lister before going back to the earlier selected folder, but at least I don't need to play around with external scripts.

Bucky the nice thing about DOpus is we can often do things the way we personally want to do them. :slight_smile: Myself I'm not a big fan of the copy and paste files and folders method but there's nothing wrong with it. It's just not my preferred way to rearrange files and folders.

I see mrwul is happy with the results now, but I went ahead and revised the way I went about doing this anyway (because I'm starting to like this as a DnD option) so it's not limited to around 5 kb of full path folder/file names. It now uses three batch files in sequence. The first deletes a specific temp file in the Windows temp directory if that file exists before we do anything else. The second batch file takes each item selected in DOpus and sends it to a newly created specific temporary text file, putting the fully qualified path of each of those selected items on a line by itself in the temporary file. And the third batch file creates the new destination folder, then copies all the items listed in the temp file, to that new folder.

In the interests of keeping this as simple as possible, I've merely named the three batch files

C:\Mine\cmd\script1.cmd
C:\Mine\cmd\script2.cmd
C:\Mine\cmd\script3.cmd

Below are the contents of each batch file:

rem BEGIN BATCH FILE NUMBER 1
if exist "%TEMP%\DOpus-Queue.tmp" del "%TEMP%\DOpus-Queue.tmp" /Q
goto:EOF
rem END BATCH FILE NUMBER 1

rem BEGIN BATCH FILE NUMBER 2
echo %1>> "%TEMP%\DOpus-Queue.tmp"
goto:EOF
rem END BATCH FILE NUMBER 2

rem BEGIN BATCH FILE NUMBER 3
dopusrt /cmd CreateFolder %1
set DST=%1
for /f "tokens=*" %%a in ('type "%TEMP%\DOpus-Queue.tmp"') do (
dopusrt /cmd Copy %%a TO %DST%
)
goto:EOF
rem END BATCH FILE NUMBER 3

And last, here is what I changed the SETTINGS/FILE TYPES/ALL FILES AND FOLDERS/EDIT/DROP MENU/CREATE NEW FOLDER TO DROP INTO section to be so it puts all this together:

runmode hide
sync:"C:\Mine\cmd\script1.cmd"
sync:"C:\Mine\cmd\script2.cmd" {f}
sync:"C:\Mine\cmd\script3.cmd" "{dlgstring|Enter New Folder Name|{d}}"

For all this to work it does require a newer version of Windows such as XP. Now if I select about 1000 files/folders in DOpus to copy and choose this option to copy them to a newly created destination folder DOpus first will display a status dialog box while the second script is generating the temporary file that holds all the names. When that file is finished and the new directory is created then DOpus begins copying the items to the new location. One thing to keep in mind is the DOpus copying status dialog box will not be displaying the total percentage of all the files being copied. It will display the percentage progress of each item being copied in the list. So once again this is not as good as it would be if DOpus actually supported this internally, but it's better than the method I posted yesterday.

JohnZeman,

There's nothing wrong with having different opinions and/or methods to achieve something, I was just worried that somehow I was completely missing the point :slight_smile:

:blush:

ahum ...(newbe) ...

Thanks!!

For me - the problem is solved.

thank you all verrry much folks!!!

brgds

For the record - the clipboard copy-or-cut and paste method was what I had originally tried using several months ago as I mentioned earlier in this thread. I don't know why, but it doesn't seem to 'always' work. Seems like some weird timing issue like we sometimes see when using sync:dopusrt...

Steje,

Weird timing issues indeed. Sometimes the files would be copied but DOpus would not execute the "go back" command. Playing around, I changed it to be "go up" and haven't seen anything strange since. Don't ask me why this would work better, I can't explain.

I'm not saying it now works 100% all the time, al I can say is that I haven't seen anything strange since. I must admit that I never use this command on "many" files though. I just use it to sort (a few) files from my /incoming folder into subfolders.

Still, DOpus should just automagicly create any nonexistant dirs in the copy command :slight_smile:

I though I had actually submitted this sort of thing as a program suggestion but couldn't find any trace of it in my email - so I just did:

support request tracking number: 320024204262

So - Porc and I go back and forth sometimes in email about stuff... this was one of those er... 'stuffs'. JohnZ would probably appreciate this since he and I recently had an exchange of 'hey you can do this simpler maybe'. From Porc:

Batch File:
rem BEGIN BATCH FILE
@echo off
mkdir %1
dopusrt /cmd Copy TO %1
dopusrt /cmd Go %1 Newtab
rem END BATCH FILE

Button:
Batchfile.bat "{dlgstring|Hello|{d}}"

Personally, I strip mine down to just...

Batch File:
mkdir %1
dopusrt /cmd Copy TO %1

Dopus drop menu action:
runmode hide
cptonew.cmd "{dlgstring|New folder to COPY items to...|{d}}"

Hey John - I was grateful for your method because it did what I needed better than the old sync: ridden way I had originally employed... The reason I like Porcs way is that since we're not operating on the files one by one by shifting through the parameter list, a +Z will 'undo' an entire copy/move selection of however many files in one shot. We're not even passing any filespec to the batch file and so the un-scoped Dopus Copy command is simply running against whatever is selected in the current lister. Yahoo... I've been feeling rather brain dead lately - so please anyone chime in if there are any holes in Porcs version of the solution :slight_smile:. Could the mkdir maybe not create a series of sub-folders on Win98? I want to say 98 did not allow nested folder creation like that... I can't recall for sure tho.

Actually, there would two batch files and buttons.

Batch File:
mkdir %1
dopusrt /cmd Copy TO %1
dopusrt /cmd Go OpenInDest %1 Newtab

Button:
Batchfile.bat "{dlgstring|Hello|{d}}"

and

Batch File:
mkdir %1
dopusrt /cmd Copy TO %1
dopusrt /cmd Go %1 Newtab

Button:
Batchfile.bat "{dlgstring|Hello|{s}}"

But then, we could just write a C++ program that does this kind of thing .
We could add some command line configuration options that allow us to specify whether this is a Copy or a Move, what pane to do the Copy/Move to, and how to display the result .
Do we open the New Folder in a New Tab, open the New Folder in the Current Tab, or simply leave the display as it is ?

And as flexible as that is, we could add an option to override any default configuration option in the dialog string when we enter the name ofthe New Folder or a Nested Folder.
How about using some kind of a letter code and use a docol :: to separate it from the new folder name ?

Hey, we could even strip out illegal filename characters, except a docol :: .

I'll see if I can write something quickly here and get it out to Tanis.
I think I'll call it FlexFolder, so be looking for it under downloads.

:opusicon: porcupine

One thing is for sure... the idea triggered a lot of reactions and solutions, definitaly a lot more
than ones in the feature request forum... :slight_smile:

brgds

ok i installed the flexi folder, worked fine.

but i'm no expert at opus scripting etc...... what exactly do i need to change/edit in the function to make the default action be MOVE instead of copy the files?

thanks

Hello jaquestati,
I'm glad it works !

Default Action: Copy to Dest, Open in New Tab .

runmode hide
"C:\Program Files\GPSoftware\Directory Opus\FlexFolder.exe" CDT {sourcepath|noterm} "{dlgstring|Specify New Folder to COPY/MOVE items to ... } " {destpath|noterm}

Default Action: Move to Dest, Open in New Tab .

runmode hide
"C:\Program Files\GPSoftware\Directory Opus\FlexFolder.exe" MDT {sourcepath|noterm} "{dlgstring|Specify New Folder to COPY/MOVE items to ... } " {destpath|noterm}

I made a a DOpus toolbar which contains a sample FlexFolder button that has the default action as MOVE. You can download it here.

:opusicon: porcupine

ok it works great :slight_smile:

i'll take it :slight_smile:

saves me a ton of time......

hate to gripe.... i'm so happy i've found this :slight_smile: but is there any way to make it create the new directory as a subdir of the selected files lister instead of the folder open in the other lister?

It is not a gripe, you are beginning to understand.

Yes !
Change MDT to MST , or MSF , or MSN .

M is move, C is Copy .
D is Dest, S is Source .
T is Open Folder in New Tab, F is Open Folder, N is Normal or Not Open Folder.

If you need these letters ( M, D, T , ... ) in another language, I could write a version for you.
I would need to know what the translated letters would be.

:opusicon: porcupine

thanks :slight_smile:

now i have it working perfectly....... and witha kb shortcut

sigh.......

it's like christmas.....

back to one click move/create subdirs :slight_smile:

so much time saved everyday :slight_smile:

In case anyone on this old thread hasn't noticed, with the release of 8.2.0.0 update, GPSoft has added a CREATEFOLDER argument to the Copy command which allows the creation of a new folder to be used as the destination for a copy/move op. Personally I use it like so:

dopusrt /cmd Copy TO HERE CREATEFOLDER "{dlgstring|Specify folder-name to COPY items to...|{d}}"

... because I like to see the destination path in the dialog that opens up. Otherwise, you can just use something like Copy TO HERE CREATEFOLDER and Dopus prompts you with it's own dialog "Enter the name of the destination folder to create.".

Cheers... and woo-hoo! Who's better than Jon and Greg?

[quote="steje"]Well Hell to you too mrwul...

Once upon a time I came up with this series of commands that did what I think you're looking to do:

sync:dopusrt /cmd Clipboard COPY
sync:dopusrt /cmd CreateFolder "{dlgstring|Specify folder-name to create and COPY items to...|{destpath$}}" READAUTO
sync:dopusrt /cmd Clipboard PASTE
sync:dopusrt /cmd Go {sourcepath$}

...but somewhere along the line it's proven to be not all that reliable. It often doesn't actually copy the files in some cases - and I'm not sure 'why'. Damn...

I recently tried doing it with just a plain Dopus Copy command and using environment variables to save the new folder path, and THAT doesn't quite work either. Double damm...

I know some ppl here like JohnZeman are fans of external copy utilities like xxcopy, and it works fine for a single file copy, but not so good with multiple files (get prompted to create the new folder for every file:-)). Triple damn...

In any event, I'd prefere to keep the Dopus copy progress window anyway, so I REALLY REALLY wish Gpsoft would extend the internal Copy command functionality to accept an argument to create a new directory in the destination.[/quote]

Hello to you,

Guess it is still not part of Directory Opus??

Frankly, it works really fine with me - I use it often.
COme to think of it: image I have to install DO from scratch
Actually I would have to make a study of it again, how I got
it working :confused: , so best is that this is one of the default things of DO,
right?

brgds

Huh??? Didn't you read the very last post from 25 Oct 2005? GPSoft did indeed add this support internally with the 8.2 release. Everything that used to require the 4 separate commands in the quote you mentioned can now be done with the one new command mentioned in my last post. If it wasn't clear from the previous posts, you can change the {d} to {s} if you want the new folder created in the 'current/source' folder instea dof in a destination folder.

[quote="mrwul"]Actually I would have to make a study of it again, how I got it working :confused: , so best is that this is one of the default things of DO,
right?[/quote]

Check out the Settings->Import and Export... feature. There should be very little reason to have to ever go back and figure something out again if you export your settings periodically. The feature saves all customizations to a single (.DPS) file which you can always re-import to get all of your settings back. I suggest keeping several copies of exported settings around... one you consider to be a 'known' stable and properly working configuration, and then 'incremental' settings as you experiment with changing your configuration to do new things.

Huh??? Didn't you read the very last post from 25 Oct 2005? GPSoft did indeed add this support internally with the 8.2 release. Everything that used to require the 4 separate commands in the quote you mentioned can now be done with the one new command mentioned in my last post. If it wasn't clear from the previous posts, you can change the {d} to {s} if you want the new folder created in the 'current/source' folder instea dof in a destination folder.

[quote="mrwul"]Actually I would have to make a study of it again, how I got it working :confused: , so best is that this is one of the default things of DO,
right?[/quote]

Check out the Settings->Import and Export... feature. There should be very little reason to have to ever go back and figure something out again if you export your settings periodically. The feature saves all customizations to a single (.DPS) file which you can always re-import to get all of your settings back. I suggest keeping several copies of exported settings around... one you consider to be a 'known' stable and properly working configuration, and then 'incremental' settings as you experiment with changing your configuration to do new things.[/quote]

Hi,
Oops! :blush:
eh...
Well, frankly, no, I was not subscribed to this thread anymore. Sorry.
However, as I am using this feature sooo many times and am very happy with it (ever been reorganizing many hundreds of photos and other stuff?)
and was wrongly assuming that it would not have been included i thought i would re-start this thread again.

I have not yet used the new feature of 8.2: still using the below .cmd file.
Have shortly glanced at the 'overview of new features' but cud not trace this new feature being mentioned.

As said, I am still using the .cmd-file which was given earlier in this thread.

//
rem BEGIN BATCH FILE
@echo off
dopusrt /cmd CreateFolder %1
set DST=%1
:loop
shift
if {%1}=={} exit
dopusrt /cmd Copy %1 TO %DST%
goto:loop
rem END BATCH FIL
//

Have to tell, I am an 'simple end-user' only. Most likely I am using only a fraction of DO's power and features.
Because me being just an end-user, pls accept that I am not familiar with all these 'expert'-internal command-things.

The above works fine and frankly I have to go way back in this thread to find out hรณw I got it working... :wink:

Same as that one way or the other I have managed to get three buttons (all being the same) for an external program in my toolbar.
(\flashrename.exe). Spent already quite some time to figure out how I can get rid of it. Actually, I gave up and will leave the buttons there
(one of them even does not work, it produces an error).
Guess if I were to re-install DO, then they will be gone.
(this is one of the reasons for me asking whether the create folder feature was part of 8.2 - being afraid that after a fresh install I had
to go all over the create folder.cmd-file-stuff again to get it working etc. ahum)

See, this is just one of those things, where an expert wud say, look there and there and do that.

Same as that I'd like to have 'create folder' under the RMB.

Same as I wud like to have the box-size (above .cmd-file) say a dozen characters wider,so I cud see a bit more of the path.

But then again, those are really minor things.

As for .dps - thank you for yr advice. Have very recently started to export settings.

Thank you again.

--