Paste Special - Structures Scrap Clips - Zipped files

Discussion & Support for xplorer² professional

Moderators: fgagnon, nikos, Site Mods

Post Reply
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

I am using
Paste Special - Structures Scrap Clips
but keep hitting problems when there any ZIP files in the source folders.

I get an error message ... "There is already a folder with the same name as the file name you specified. Specify a different name"

but there is no way to specify a different name ... the Try Again button merely repeats the error and the cancel button abandons the task.

* is there a recommended method to avoid the problem and the error?
* if not how can I resolve the problem by specifying a different name?
(as I have hundreds of zip files I would like a way to Auto-rename, eg If error, then add "xx" to filename

hoping someone knows of an answer,

regards
Mark
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by nikos »

can you give us a small example how this fails? E.g. have the smallest folder hierarchy that causes it? Are you browsing files INTO the zipfolder?
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

nikos wrote:can you give us a small example how this fails? E.g. have the smallest folder hierarchy that causes it?
Hi Nikos
Thanks for your reply ...

I am not sure how to answer your question, but
* So long as I do not include any zip files in the PS-SSC I have copied without any problem - 3818 files; in 385 folders; amounting to 826Mb
* but as soon as I include any zip files in the selection, then I hit error message
Are you browsing files INTO the zipfolder?
The source Zip files do contain other files, sometimes many other files.
would this cause problems?
(it is an essential part of the process to copy any source zipped files into the proper structure within the destination folders.)

can you help further?

regards
Mark
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by nikos »

what I'm asking is do you "unpack" the zip file contents in the scrap container or is it only the zip file that appears?
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

nikos wrote:what I'm asking is do you "unpack" the zip file contents in the scrap container or is it only the zip file that appears?
Hi Nikos,

After I Flatten the My Documents Folder (source folders) I do not do anything else to deliberately unpack the Zip files.
I simply:-
* select every file that has been flattened and
* filter to display only a single year's files based on modification date
* sort by extension (to see if there are any Zip files)
* select some/all files
* browse to the destination location
* paste special, structured scrap clips
If I include zipped files in the selection then I get error messages,
If I exclude zipped files the copy into folder structure seems to work ok -


objective: I want each zipped archive to be copied as a zipped archive, so that I can later:-
* browse the destination folders
* locate the zipped archive
* use the zipped archive as normal, ie browse, unpack etc
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by Kilmatead »

A little experimenting shows that this interference is being caused by the shell's CLSID handling of Zip/Cab files in Windows itself (the ability to browse into them and treat them like folders) - I was able to recreate the OP's error.

As an extreme solution (which can be easily reversed) see this article to temporarily disable/enable Zip handling with a couple of simple reg files, which will allow the structured-pasting to complete. (They work fine, and only require x2 to be restarted to activate, not a full logoff.)

That being said, there's got to be a better long-term solution (though how many people actually understand [never mind use] Structured scrap clips?)... but that's a different story...
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

Hello Kilmatead
I have had a look at the article; I normally avoid editing the registry altogether because I don't understand it (except for using X2 Advanced-Options) the documented procedure does seem simple though so I plan to try it. perhaps after work tonight
That being said, there's got to be a better long-term solution
I would suggest that Ideally X2 would simply handle the problem invisibly, however
If not possible - give a detailed warning that the problem encountered is to do with Zip/Cab (Other?) files and advice on where to find more information (how about a link to this thread :-)
If the problem is to do with registry settings then it sounds like a 'feature' that could be set/reset via Advanced-Options

(though how many people actually understand [never mind use] Structured scrap clips?)... but that's a different story...
Yes I have been using X2 for several years and this is the first time I have used Paste-special-structured-scrap-clips ... BUT it appears to be the only/right tool to do what I want now that I want it. is there a better way?


I agree about the name though .. It fails to make it's purpose clear to the 'new' user
I try to think of it as "Paste selected files within their source-folder structure"
any other suggestions
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by nikos »

I will check for a solution "in due course"
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

nikos wrote:I will check for a solution "in due course"
Hi Nikos,
... good news :-)

I will let you know how my experiments of other suggestion go, but I may not get a chance till next weekend.

regards
Mark
Kilmatead
Platinum Member
Platinum Member
Posts: 4573
Joined: 2008 Sep 30, 06:52
Location: Dublin

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by Kilmatead »

As a simple observation, the easiest method is to just rename all the zip file extensions in your original structure before you start (since you're not doing anything "folder-ish" with them, there's no need for the shell to know what they are) - rename them all to ".__zip" or something, do the copy/pasting thing, then rename them back to plain old .zip :shrug:

Of course, this necessitates renaming "back" both the copies and the originals, but if you're terrified of the registry (or unable to run as admin) this is a quick and dirty workaround (and an opportunity to learn about mass-renaming stuff in a structure - though, if you're using structured clips in the first place you could probably mass-rename all the Galápagosian animalia with your eyes closed and still have a cigarette left over for "later"). :D
User avatar
nikos
Site Admin
Site Admin
Posts: 15771
Joined: 2002 Feb 07, 15:57
Location: UK
Contact:

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by nikos »

I saw this problem but unfortunately the cause is not xplorer2 but how windows code SHFileOperation treats zipfolders. This will be a lot of work to fix and I don't think the effort is justified given the low impact of this problem and the workarounds mentioned above (e.g. temporary rename zip files)
appyface
Silver Member
Silver Member
Posts: 228
Joined: 2005 Jun 11, 16:48

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by appyface »

I've been waiting for a fix for some time now, I finally wanted to come post about this issue and found this thread.

I'm sorry to learn the fix won't be coming. I have tons of zip files scattered everywhere and they're nearly always involved in one operation or another. The paste structured scrap clips feature is incredibly useful for the few times zip files aren't involved and I can leverage it. I could use it so much more often if it ever gets a fix. It's a great time saver when it works.
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

I used the Structured scrap clips method for many years.

During Covid I developed some code using window's robocopy

at the time I did careful checking to proove that the 2 methods produced the same recults - which they did.

I now find the robocopy method simpler to use once a year (or whenever)



OBJECTIVE to make a yearly archive of all new files in the last 12 months, and to store the archive in the same folder structure as the originals.

[1] use paste special, structured scrap clips as discussed in this thread

[2] use windows batch file & Robocopy command
* batch file name ... __Robocopy Incremental Backup-Dated Period (DocsByYear).bat
* batch file contents:-

Code: Select all

@ECHO off


REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM Settings-General 
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


MODE CON lines=50 cols=250

SET MyWait=5

REM to hide debug messages .... SET DeBug=REM
REM to show debug messages .... SET DeBug=
SET DeBug=



REM Settings - Locations
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~

REM set source folder ... no trailing \     "" if spaces in names
SET rcPathSource="A:\_myData\Marks Documents"

REM set destination folder ... no trailing \     "" if spaces in names
SET rcPathDestination="A:\~BUs\~BU__ARC__Docs_By_Year\Docs ARC__"

REM select/filter files to be copied ... use ""  around filter  eg "*.*"
SET rcFileIncludeSet="*.*"

REM set destination folder of Logfile ... no trailing \     "" if spaces in names
SET rcLogFile="A:\_myData"



REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
REM END Settings-General 
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~












REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:Robocopy'UserInputDatedPeriod'MyData 
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

REM http://ss64.com/nt/robocopy.html 

CALL :LogFileTimeStamp

			REM clear any previous values for:-
SET STARTmaxage=
SET ENDminage=

			REM get Start Date
												CLS
												ECHO .
												ECHO .
												ECHO Type period STARTDate ... yyyymmdd    (NO Spacers)
												ECHO .
												ECHO .
												ECHO .
												ECHO .
												ECHO .
												ECHO (EXcludes files Older than ...........yyyymmmdd H00:M00:S00.d01am)
												ECHO (For DocsbyYear 2021.... StartDate should be = 2021-01-01)
												ECHO .
												ECHO .
												ECHO .
												ECHO .
												ECHO .... then press ENTER ....
												ECHO .
												ECHO .
SET /P STARTmaxage=


			REM get END Date
												ECHO .
												ECHO .
												ECHO Type period ENDDate ... yyyymmdd     (NO Spacers)
												ECHO .
												ECHO .
												ECHO .
												ECHO .
												ECHO .
												ECHO (EXcludes files Newer than ...........yyyymmmdd H00:M00:S00.d01am) 
												ECHO (For DocsbyYear 2021.... StartDate should be = 2022-01-01)
												ECHO .
												ECHO .
												ECHO .
												ECHO .
												ECHO .... then press ENTER ....
												ECHO .
												ECHO .
SET /P ENDminage=










SET rcPathSource=%rcPathSource%
SET rcFileIncludeSet="%rcFileIncludeSet%"

		REM remove Quotes from original - then replace as needed
		SET rcPathDestination=%rcPathDestination:"=%
SET rcPathDestination="%rcPathDestination%%LogFileTimeStamp%__(%STARTmaxage% to %ENDminage%)__newFiles in period"

		REM remove Quotes from original - then replace as needed
		SET rcLogFile=%rcLogFile:"=%
SET rcLogFile="%rcLogFile%\~Log__%LogFileTimeStamp%__(%STARTmaxage% to %ENDminage%)__newFiles in period.txt"



rem  SET rcOptionsLog="%rcOptionsLog%\z~LogIncremental.txt"
SET rcOptions=/s /r:1 /w:5 /maxage:%STARTmaxage% /minage:%ENDminage% /LOG+:%rcLogFile%.txt /TEE /TS /NP /NDL 



												%DeBug% CLS
												%DeBug% COLOR 1F & REM .....COLOR 1F..........bg=Blue  fg=BrightWhite	
												%DeBug% ECHO This Sub Label..........%%0.....%0
												%DeBug% ECHO called from.............%%1.....%1
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% ECHO .
												%Debug% ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
												%Debug% ECHO :::Robocopy'UserInputDatedPeriod'MyData 
												%Debug% ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
												%Debug% ECHO .
												%Debug% ECHO %%date%%...now.............................%date%
												%Debug% ECHO %%time%%...now.............................%time%
												%Debug% ECHO %%LogFileTimeStamp%%.......................%LogFileTimeStamp%
												%Debug% ECHO %%rcPathSource%%...........................%rcPathSource%
												%Debug% ECHO %%rcPathDestination%%......................%rcPathDestination%
												%Debug% ECHO %%rcLogFile%%..............................%rcLogFile%
												%Debug% ECHO .
												%Debug% ECHO %%STARTmaxage%%............................%STARTmaxage% 
												%Debug% ECHO %%ENDminage%%..............................%ENDminage% 
												%Debug% ECHO .
												%Debug% ECHO .
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% ECHO .
												%Debug% ECHO /S..........copy subfolders
												%Debug% ECHO /r:1........Number of Retries on failed copies - default is 1 million
												%Debug% ECHO /W:5........Wait time between retries - default is 30 seconds.
												%Debug% ECHO /LOG+:file..Output status to LOG file (append to existing log)
												%Debug% ECHO /TEE........Output to console window, as well as the log file
												%Debug% ECHO /TS.........Include Source file Time Stamps in the output.
												%Debug% ECHO /NP.........No Progress - don't display % copied.												
												%Debug% ECHO /NDL........No Directory List - don’t log directory names.											
												%Debug% ECHO .
												%Debug% ECHO robocopy %rcPathSource% %rcPathDestination% %rcFileIncludeSet% %rcOptions%
												%Debug% PAUSE

robocopy %rcPathSource% %rcPathDestination% %rcFileIncludeSet% %rcOptions%



												%Debug% ECHO .
												%Debug% ECHO .
												%Debug% ECHO check ... has RoboCopy copied files into %rcPathDestination%
												%Debug% PAUSE


GOTO :eof
REM _____________________________________________________________________________________________________________________________________________________________________________________________________________
REM EndOf Robocopy'UserInputDatedPeriod'MyData
REM _____________________________________________________________________________________________________________________________________________________________________________________________________________
REM _____________________________________________________________________________________________________________________________________________________________________________________________________________
























REM ===============================================================
:LogFileTimeStamp
REM ===============================================================


SET year=%date:~6,4%
SET month=%date:~3,2%
SET day=%date:~0,2%

SET hour=%time:~0,2%
SET minute=%time:~3,2%
SET seconds=%time:~6,2%
SET decimalSeconds=%time:~9,2%

REM .....For hours LEQ 10 add a Leading-Zero
if %hour% LSS 10 set HHhour=0%hour:~1,2%
if %hour% GEQ 10 set HHhour=%hour%

REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
SET LogFileTimeStamp=%year%-%month%-%day%__%HHhour%-%minute%-%seconds%'%decimalSeconds%
REM ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


												%DeBug% CLS
												%DeBug% COLOR 1F															& REM .....COLOR 1F..........bg=Blue  fg=BrightWhite	
												%DeBug% ECHO This Sub Label..........%%0.....%0
												%DeBug% ECHO called from.............%%1.....%1
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% COLOR 56	& REM (.....COLOR 56..........bg=Purple  fg=Yellow)
												%DeBug% ECHO ............................................................................................
												%DeBug% ECHO :LogFileTimeStamp
												%DeBug% ECHO ............................................................................................
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
												%DeBug% ECHO Build LogFileTimeStamp
												%DeBug% ECHO ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
												%DeBug% ECHO date .................... %date%
												%DeBug% ECHO time .................... %time%
												%DeBug% ECHO ~~~~~ ~~~~~ ~~~~~ ~~~~~ ~~~~~ ~~~~~
												%DeBug% ECHO ....................................Date:
												%DeBug% ECHO year............................... %date:~6,4%%
												%DeBug% ECHO month.............................. %date:~3,2%
												%DeBug% ECHO day................................ %date:~0,2% 
												%DeBug% ECHO ....................................time:
												%DeBug% ECHO hour............................... %time:~0,2% 
												%DeBug% ECHO HHhour..............................%HHhour%
												%DeBug% ECHO minute............................. %time:~3,2% 
												%DeBug% ECHO seconds............................ %time:~6,2%
												%DeBug% ECHO decimalSeconds..................... %time:~9,2%
												%DeBug% ECHO LogFileTimeStamp................... %LogFileTimeStamp%
												%DeBug% ECHO .
												%DeBug% ECHO .
												%DeBug% PAUSE
	
GOTO :eof
REM _____________________________________________________________________________________________________________________________________________________________________________________________________________
REM End of  :LogFileTimeStamp
REM _____________________________________________________________________________________________________________________________________________________________________________________________________________
REM _____________________________________________________________________________________________________________________________________________________________________________________________________________





Last edited by mjbrookes on 2022 Oct 20, 10:01, edited 1 time in total.
User avatar
johngalt
Gold Member
Gold Member
Posts: 559
Joined: 2008 Feb 10, 19:41
Location: 3rd Rock
Contact:

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by johngalt »

Just as an aside - I think that might be a new record for post zombification. And this is not an insult, but rather giving credit where credit it due. You searched for an answer for what you're trying to do, bravo!

Bonus: Thanks for batch to run the robocopy, too!
Last edited by johngalt on 2022 Oct 26, 22:54, edited 1 time in total.
Image

Image
mjbrookes
Bronze Member
Bronze Member
Posts: 116
Joined: 2007 Sep 19, 11:24

Re: Paste Special - Structures Scrap Clips - Zipped files

Post by mjbrookes »

Hi John

Thanks for the encouragement :-)

I always have the feeling that when I post MY answer most of the forum readers will find it
simplistic and obvious, and possibly wrong!

then I sternly tell myself to write what I would have liked to find before I had to go and find my own answer. :lol:
Post Reply