script to wipe file and folder
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
script to wipe file and folder
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
I wish one script to wipe all file and all folder in my folder...
It's possible?? Thanks
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
Just wipe the folder itself, all subfiles / folders are wiped automatically...
One of my scripts helped you out? Please donate via Paypal
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
I want run one script to wipe....all files and folders....with keyboard shortcut
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
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....
I want one script to wipe all files and all folders into aaa folder....
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
1. listfolder()
2. wipe
2. wipe
One of my scripts helped you out? Please donate via Paypal
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
mmmm...
listfolder(C:\aaa)
wipe
It's correct?
listfolder(C:\aaa)
wipe
It's correct?
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
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?
One of my scripts helped you out? Please donate via Paypal
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
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??
But my request is: how to wipe all file and all folder into one existing folder??
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
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...
Configuration - General - Menus, Mouse, Safety, File List...
[x] Flatten Folder [folders only]
Right click on a folder, context menu...
One of my scripts helped you out? Please donate via Paypal
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
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;
}
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;
}
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
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...
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...
One of my scripts helped you out? Please donate via Paypal
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
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!
Into this folder, other sub-folders (with files inside) and others various files..
I want wipe all files and all sub-folders!
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
And I can't see your problem *sigh*
Maybe somebody else does...
Maybe somebody else does...
One of my scripts helped you out? Please donate via Paypal
-
swan_x
- Posts: 335
- Joined: 08 Oct 2009 12:27
Re: script to wipe file and folder
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...
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...
-
highend
- Posts: 14940
- Joined: 06 Feb 2011 00:33
- Location: Win Server 2022 @100%
Re: script to wipe file and folder
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);
One of my scripts helped you out? Please donate via Paypal
XYplorer Beta Club