clone file sctructure here
-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
clone file sctructure here
Sometimes I would like to copy the whole file structure only (folders and files) like "create branches here" does but including the file names too while preserving original dates and attributes?
On the other hand, copy just the files stripping off any folder structure, appending suffixes in case of name collisions? I'm aware I could do a file search, right click and rich copy/move, but a submenu entry would do it faster.
On the other hand, copy just the files stripping off any folder structure, appending suffixes in case of name collisions? I'm aware I could do a file search, right click and rich copy/move, but a submenu entry would do it faster.
Power-hungry user!!!
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
Re: clone file sctructure here
I guess that using no header at all would save disk space at the same time it will allow me to later open such files with notepad2 and write general notes on them, that way I'd kill two bunnies in a single shot. So yes, 0 bytes is a good idea!
Power-hungry user!!!
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
Re: clone file sctructure here
Smart IT people who want to quickly audit and make notes on (irregular?) users' files locally to report abnormalities to their bosses without first running complicated tools to generate reports which need specific software to be opened... well, I bet you got the picture! 
Power-hungry user!!!
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: clone file sctructure here
I use this technic to save info about an folder from an test installation of an app.
I use an packer plugin of TC to generate an report of this folder in an text file.
Since TC can show archives as folders this technic is used to show this text file
as an kind of an archive and show the folder structure with o byte files
but with all infos as timestamp and attributes and size.
It's an kind of this catalog makers to scan an CD and store this as an file.
I tried this with XYplorer but i had no luck.
This is not recursive:
copytext report("{Dir {fullname}\|{fullname}|}<crlf>");
I have to code around it with
And this i didn't get to work:
folderreport("dirs:{Dir {fullname}\|{fullname}|}", "c", , "r");
Once i had an list like:
X:\path\to\sub\folder\
X:\path\to\sub\folder\file.ext
X:\path\to\sub\folder\subfolder\
X:\path\to\sub\folder\subfolder\file.ext
i would make an code like
I use an packer plugin of TC to generate an report of this folder in an text file.
Since TC can show archives as folders this technic is used to show this text file
as an kind of an archive and show the folder structure with o byte files
but with all infos as timestamp and attributes and size.
It's an kind of this catalog makers to scan an CD and store this as an file.
I tried this with XYplorer but i had no luck.
This is not recursive:
copytext report("{Dir {fullname}\|{fullname}|}<crlf>");
I have to code around it with
Code: Select all
$folderreport = folderreport
foreach folder in $folderreport
report("{Dir {fullname}\|{fullname}|}<crlf>");
folderreport("dirs:{Dir {fullname}\|{fullname}|}", "c", , "r");
Once i had an list like:
X:\path\to\sub\folder\
X:\path\to\sub\folder\file.ext
X:\path\to\sub\folder\subfolder\
X:\path\to\sub\folder\subfolder\file.ext
i would make an code like
Code: Select all
ForEach Item In List
Remove ":"
If LastChar == "\"
{
new Item, dir
}Else
{
new Item, file
}-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
Re: clone file sctructure here
Another practical usage for this: in case of suspicion on virus attack, I can quickly compare timestamps of a zipped, cloned dir against files which were not pointed as affected by regular AV but I suspect they were infected.
Or use such directories as honeypot, and in case of suspicion quickly verify mod dates and non-zero files where it's expected to have zero files only.
By reading Stefan's comment I must add that as far as I know no catalog software currently on market can do this so that would be another "XYplorer-only" function.
Or use such directories as honeypot, and in case of suspicion quickly verify mod dates and non-zero files where it's expected to have zero files only.
By reading Stefan's comment I must add that as far as I know no catalog software currently on market can do this so that would be another "XYplorer-only" function.
Power-hungry user!!!
-
DmFedorov
- Posts: 716
- Joined: 04 Jan 2011 16:36
- Location: Germany
Re: clone file sctructure here
tiago
I use WhereIsIt to compare, although this program is intended primarily for other purposes. Of course if it did XY - it would be easier, more convenient and (judging by the speed of hash-md5) faster.
I always wondered why this work is done only cataloger-programs, because when it comes to your drive, in this case
logically - it is explorer work.
I use WhereIsIt to compare, although this program is intended primarily for other purposes. Of course if it did XY - it would be easier, more convenient and (judging by the speed of hash-md5) faster.
I always wondered why this work is done only cataloger-programs, because when it comes to your drive, in this case
logically - it is explorer work.
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: clone file sctructure here
A new command in Paste Special called "Paste Folder and Files Structure" would do, right? Or anybody got a better name? E.g. "Paste Zero Byte Image"?
FAQ | XY News RSS | XY X
-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
Re: clone file sctructure here
"Paste Whole File Structure and Attribs, 0 Bytes"?
This implies "folders" while hint and clarifies that this will not be a "copy files" in any way.
Thank you very much for the implementation, Donald! I can think about other uses now it seems it'll be possible, and getting a script ready to implement the "append info" for the cases I mentioned I'll need to. Basically it reads info from pane X's selected file and write that into the currently selected file, the brand new clone as needed.
This implies "folders" while hint and clarifies that this will not be a "copy files" in any way.
Thank you very much for the implementation, Donald! I can think about other uses now it seems it'll be possible, and getting a script ready to implement the "append info" for the cases I mentioned I'll need to. Basically it reads info from pane X's selected file and write that into the currently selected file, the brand new clone as needed.
Power-hungry user!!!
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: clone file sctructure here
"Paste Whole File Structure and Attribs, 0 Bytes" ... ultraclumsy!tiago wrote:"Paste Whole File Structure and Attribs, 0 Bytes"?
This implies "folders" while hint and clarifies that this will not be a "copy files" in any way.
Thank you very much for the implementation, Donald! I can think about other uses now it seems it'll be possible, and getting a script ready to implement the "append info" for the cases I mentioned I'll need to. Basically it reads info from pane X's selected file and write that into the currently selected file, the brand new clone as needed.
What's bad about "Paste Zero Byte Image"? Sounds slick.
FAQ | XY News RSS | XY X
-
tiago
- Posts: 589
- Joined: 14 Feb 2011 21:41
Re: clone file sctructure here
"Image" in case may mislead users non-familiar with the idea.
"Paste Zero Byte Structure"?
"Paste Zero Byte Structure"?
Power-hungry user!!!
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: clone file sctructure here
How about "Paste As Zero Byte"?admin wrote:What's bad about "Paste Zero Byte Image"? Sounds slick.
- - -
Don, can you take an look at this issue:
This folderreport() example works:
text folderreport("dirs:{fullname}; {size kbr}; {modified yyyy-mm-dd}", "r", , "r");
But the "dir" template {Dir dir_value|file_value|drive_value} i don't get to work:
text folderreport("dirs:{dir {fullname}|{fullname}; {size kbr}; {modified yyyy-mm-dd}|}", "r", , "r");
I get always only the first format from the dir_value for all folders and files. The format from file_value is dropped.
But the help says it should work:
Help > folderreport() wrote:Types "tree" and "dirs" support a format template.
The template is appended to the "dirs"/"tree" selector separated by a ":" (colon),
and it fully supports the syntax of the template argument in report.
I want to get an recursive folderreport with different info from folders and files:
text folderreport("dirs:{dir {fullname} -add an \|{fullname}|}", "r", , "r");
X:\path\to\sub\folder -add an \
X:\path\to\sub\folder\file.ext
X:\path\to\sub\folder\subfolder -add an \
X:\path\to\sub\folder\subfolder\file.ext
-
admin
- Site Admin
- Posts: 66094
- Joined: 22 May 2004 16:48
- Location: Win8.1, Win10, Win11, all @100%
- Contact:
Re: clone file sctructure here
But folderreport("dirs: ... only returns dirs. It makes no sense to use the dir_value | file_value switch on this output.
FAQ | XY News RSS | XY X
-
Stefan
- Posts: 1360
- Joined: 18 Nov 2008 21:47
- Location: Europe
Re: clone file sctructure here
admin wrote:But folderreport("dirs: ... only returns dirs. It makes no sense to use the dir_value | file_value switch on this output.
XYplorer Beta Club