Page 1 of 2

script to wipe file and folder

Posted: 04 Apr 2016 19:07
by swan_x
Hi, I have one folder with various files and folder..
I wish one script to wipe all file and all folder in my folder...
It's possible?? Thanks

Re: script to wipe file and folder

Posted: 04 Apr 2016 19:46
by highend
Just wipe the folder itself, all subfiles / folders are wiped automatically...

Re: script to wipe file and folder

Posted: 05 Apr 2016 11:37
by swan_x
I want run one script to wipe....all files and folders....with keyboard shortcut

Re: script to wipe file and folder

Posted: 05 Apr 2016 11:52
by swan_x
I have aaa folder, into this i have bbb, ccc folder and other various file...
I want one script to wipe all files and all folders into aaa folder....

Re: script to wipe file and folder

Posted: 05 Apr 2016 12:27
by highend
1. listfolder()
2. wipe

Re: script to wipe file and folder

Posted: 05 Apr 2016 18:27
by swan_x
mmmm...
listfolder(C:\aaa)
wipe

It's correct?

Re: script to wipe file and folder

Posted: 05 Apr 2016 18:45
by highend
Nope and I don't think it's too hard to look up two commands in the help file for a 7 year long XY user, isn't it?

Re: script to wipe file and folder

Posted: 07 Apr 2016 11:04
by swan_x
I've solved temporary with wipe folder and after backupto from another place to original, an another empty folder...
But my request is: how to wipe all file and all folder into one existing folder??

Re: script to wipe file and folder

Posted: 07 Apr 2016 11:12
by highend
Are you talking about the feature: Flatten folder?
Configuration - General - Menus, Mouse, Safety, File List...
[x] Flatten Folder [folders only]

Right click on a folder, context menu...

Re: script to wipe file and folder

Posted: 08 Apr 2016 18:38
by swan_x
flattenfolder work for folder but not for variuos files outside of folder!
and what is difference to flatten and wipe?

I have one script to delete all files into one folder; I want add wipe all folder to this

"wipe" $folders = 'C:\ProgramData\.............\Logs\';
$onlyFiles = True;
$files = Replace($files, ';', '|');
$folders = Replace($folders, ';', '|');
$list = '';
foreach ($folder, $folders, '|')
{
if ($folder == '') { continue; }
if (Exists($folder) == 2)
{
$list = $list . '|' . ListFolder($folder, '*', $onlyFiles, '|');
}
}
foreach ($file, $files, '|')
{
if ($file == '') { continue; }
if (Exists($file) == 1) {
// Add files to list.
$list = "$list|$file";
}
}
$list = FormatList($list, 'dents');
if ($list != '') {
Wipe $list;
}

Re: script to wipe file and folder

Posted: 12 Apr 2016 21:03
by highend
No clue what you're talking about. Various files outside of a folder?
Flatten vs wipe? Flatten = Move all files from all subdirs in the root. Wipe = Delete files & folders without beyond recovery

Your "script"...

1. There are code tags
2. Too lazy to reformat it to make it at least readable (for whatever it's worth). Not my task to do...

Re: script to wipe file and folder

Posted: 13 Apr 2016 19:03
by swan_x
One folder "folderA"
Into this folder, other sub-folders (with files inside) and others various files..
I want wipe all files and all sub-folders!

Re: script to wipe file and folder

Posted: 13 Apr 2016 19:12
by highend
And I can't see your problem *sigh*
Maybe somebody else does...

Re: script to wipe file and folder

Posted: 14 Apr 2016 11:33
by swan_x
I don't want wipe folderA (and recreate it after)...
I want wipe all content of folderA! It is so difficult to understand??

I repeat: the script above delete all files contents into folderA, but not sub-folders...

Re: script to wipe file and folder

Posted: 14 Apr 2016 12:13
by highend
That's exactly what I wrote in post 5, listfolder() + wipe^^

Code: Select all

    $folder = "<path to the folder which contents will be wiped>";
    wipe listfolder($folder);