why this can't be undone

Discuss and share scripts and script files...
admin
Site Admin
Posts: 66254
Joined: 22 May 2004 16:48
Location: Win8.1, Win10, Win11, all @100%
Contact:

Re: why this can't be undone

Post by admin »

admin wrote:
tiago wrote:Don:
Any way to force this to report subfolders contents apart?
...
Nope.
Well, I could improve it... :)

tiago
Posts: 589
Joined: 14 Feb 2011 21:41

Re: why this can't be undone

Post by tiago »

admin wrote:
admin wrote:
tiago wrote:Don:
Any way to force this to report subfolders contents apart?
...
Nope.
Well, I could improve it... :)
Reporting subfolders up to a given sub-level, then the sub-sub-level and so on...? That would be great, Don. Reports supporting level-control would allow incredible improvements on controlling folders' contents I think.
First (files on current folder)
sub1, sub2, sub3...
Last (files on the last level of subfolders)
Power-hungry user!!!

kiwichick
Posts: 675
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: why this can't be undone

Post by kiwichick »

Hi there, This script is perfect for me! I have a folder that I regularly 'suction'. But is there a way to make the script ignore hidden files and folders? (XYplorer is not set to show them.) Cheers.
Windows 10 Pro 22H2

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: why this can't be undone

Post by highend »

Sure.

Look at the template option {Attr} for report() (which can be used for folderreport() as well) in the help file.
Ofc you have to use a gettoken() for the H flag in the output for each file and rebuild your file list afterwards (+ remove all attributes).

As an alternative, a second foreach loop in the first one that uses property("attrib", $token) and a gettoken() to check for the "H" again
to build a new list of files, that doesn't contain these entries.
One of my scripts helped you out? Please donate via Paypal

kiwichick
Posts: 675
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: why this can't be undone

Post by kiwichick »

Thanks highend, Before I look into that, would it change what I need to do if it's only one known hidden file that would be affected - desktop.ini?
Windows 10 Pro 22H2

highend
Posts: 14940
Joined: 06 Feb 2011 00:33
Location: Win Server 2022 @100%

Re: why this can't be undone

Post by highend »

Ofc.

formatlist() can filter out such entries.

An example:
$a="D:\a.txt|D:\b.txt|D:\desktop.ini|D:\c.txt"; text formatlist($a, "f", "|", "!*desktop.ini");
One of my scripts helped you out? Please donate via Paypal

kiwichick
Posts: 675
Joined: 08 Aug 2012 04:14
Location: Windows 10 Pro 22H2, 150% scaling

Re: why this can't be undone

Post by kiwichick »

Thanks highend, That did it!
Windows 10 Pro 22H2

Post Reply