If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#31
|
|||
|
|||
Delete all files except one folder
Consider using the freeware 'XXCOPY' (http://www.xxcopy.com/xcpymain.htm) to do that job. I created a structure similar to what you described and did a quick batch file. It seems to do what you want: Code: -------------------- xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy xxcopy /clone /yy F:\projectsxxcopy F:\projects\ RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. |
Ads |
#32
|
|||
|
|||
Delete all files except one folder
Consider using the freeware 'XXCOPY' (http://www.xxcopy.com/xcpymain.htm) to do that job. I created a structure similar to what you described and did a quick batch file. It seems to do what you want: Code: -------------------- xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy xxcopy /clone /yy F:\projectsxxcopy F:\projects\ RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. |
#33
|
|||
|
|||
Delete all files except one folder
Here's how it worked: BEFO Code: -------------------- F:\projectstree /f Folder PATH listing for volume f10gig D2P1 Volume serial number is 0006EE44 E48B:68F4 F:. ¦ deleteme.txt ¦ +---Project001 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---Source ¦ keepme.txt ¦ +---project002 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---source ¦ keepme.txt ¦ +---Project111 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---Source ¦ keepme.txt ¦ +---project222 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---Source ¦ keepme.txt ¦ +---project999 ¦ deleteme.txt ¦ +---source keepme.txt -------------------- AFTER: Code: -------------------- F:\projectstree /f Folder PATH listing for volume f10gig D2P1 Volume serial number is 0006EE44 E48B:68F4 F:. +---Project001 ¦ +---Source ¦ keepme.txt ¦ +---project002 ¦ +---source ¦ keepme.txt ¦ +---Project111 ¦ +---Source ¦ keepme.txt ¦ +---project222 ¦ +---Source ¦ keepme.txt ¦ +---project999 +---source keepme.txt -------------------- Does that look like what you are trying to achieve? |
#34
|
|||
|
|||
Delete all files except one folder
Here's how it worked: BEFO Code: -------------------- F:\projectstree /f Folder PATH listing for volume f10gig D2P1 Volume serial number is 0006EE44 E48B:68F4 F:. ¦ deleteme.txt ¦ +---Project001 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---Source ¦ keepme.txt ¦ +---project002 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---source ¦ keepme.txt ¦ +---Project111 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---Source ¦ keepme.txt ¦ +---project222 ¦ ¦ deleteme.txt ¦ ¦ ¦ +---Source ¦ keepme.txt ¦ +---project999 ¦ deleteme.txt ¦ +---source keepme.txt -------------------- AFTER: Code: -------------------- F:\projectstree /f Folder PATH listing for volume f10gig D2P1 Volume serial number is 0006EE44 E48B:68F4 F:. +---Project001 ¦ +---Source ¦ keepme.txt ¦ +---project002 ¦ +---source ¦ keepme.txt ¦ +---Project111 ¦ +---Source ¦ keepme.txt ¦ +---project222 ¦ +---Source ¦ keepme.txt ¦ +---project999 +---source keepme.txt -------------------- Does that look like what you are trying to achieve? |
#35
|
|||
|
|||
Delete all files except one folder
I'm chiming in at the end of what I imagine is
an extended conversation, but: If the object is just what the subject line says, to delete all of a large body of files except for one folder in that body, then make the chosen folder hidden, and make sure hidden files are not shown. Then any deletion of the body as a whole will leave the one hidden folder in existence, after which it can be un-hidden whenever that becomes desirable. Or am I missing the point of the discussion? |
#36
|
|||
|
|||
Delete all files except one folder
I'm chiming in at the end of what I imagine is
an extended conversation, but: If the object is just what the subject line says, to delete all of a large body of files except for one folder in that body, then make the chosen folder hidden, and make sure hidden files are not shown. Then any deletion of the body as a whole will leave the one hidden folder in existence, after which it can be un-hidden whenever that becomes desirable. Or am I missing the point of the discussion? |
#37
|
|||
|
|||
Delete all files except one folder
"Anthony Buckland" wrote in message news I'm chiming in at the end of what I imagine is an extended conversation, but: If the object is just what the subject line says, to delete all of a large body of files except for one folder in that body, then make the chosen folder hidden, and make sure hidden files are not shown. Then any deletion of the body as a whole will leave the one hidden folder in existence, after which it can be un-hidden whenever that becomes desirable. Or am I missing the point of the discussion? No, you're not and I love this bit of lateral thinking! |
#38
|
|||
|
|||
Delete all files except one folder
"Anthony Buckland" wrote in message news I'm chiming in at the end of what I imagine is an extended conversation, but: If the object is just what the subject line says, to delete all of a large body of files except for one folder in that body, then make the chosen folder hidden, and make sure hidden files are not shown. Then any deletion of the body as a whole will leave the one hidden folder in existence, after which it can be un-hidden whenever that becomes desirable. Or am I missing the point of the discussion? No, you're not and I love this bit of lateral thinking! |
#39
|
|||
|
|||
Delete all files except one folder
--------------------
* * xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy * xxcopy /clone /yy F:\projectsxxcopy F:\projects\ * RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. It worked. THANKS A LOT!!! |
#40
|
|||
|
|||
Delete all files except one folder
--------------------
* * xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy * xxcopy /clone /yy F:\projectsxxcopy F:\projects\ * RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. It worked. THANKS A LOT!!! |
#41
|
|||
|
|||
Delete all files except one folder
"surferdude2" wrote in message
... Consider using the freeware 'XXCOPY' (http://www.xxcopy.com/xcpymain.htm) to do that job. I created a structure similar to what you described and did a quick batch file. It seems to do what you want: Code: -------------------- xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy xxcopy /clone /yy F:\projectsxxcopy F:\projects\ RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. I think shools should test students for criminal apptiude so they know they aren't cut out for it and can lead more productive lives. Doubtful time in a correctional facility will cure you and the citizens will be paying for your keep the rest of your life. Wasting other peoples lives too, your family included. I'd say 240grains of lead is the only thing to cure the two of you. Don't really care if that's not what the two of you are doing. Spreading this kind of crap makes you guilty too. http://www.missingkids.com/ Anyone still wondering why newsgroups are going away. |
#42
|
|||
|
|||
Delete all files except one folder
"surferdude2" wrote in message
... Consider using the freeware 'XXCOPY' (http://www.xxcopy.com/xcpymain.htm) to do that job. I created a structure similar to what you described and did a quick batch file. It seems to do what you want: Code: -------------------- xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy xxcopy /clone /yy F:\projectsxxcopy F:\projects\ RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. I think shools should test students for criminal apptiude so they know they aren't cut out for it and can lead more productive lives. Doubtful time in a correctional facility will cure you and the citizens will be paying for your keep the rest of your life. Wasting other peoples lives too, your family included. I'd say 240grains of lead is the only thing to cure the two of you. Don't really care if that's not what the two of you are doing. Spreading this kind of crap makes you guilty too. http://www.missingkids.com/ Anyone still wondering why newsgroups are going away. |
#43
|
|||
|
|||
Delete all files except one folder
On Fri, 18 Jun 2010 05:42:45 -0400, "T Shadow" wrote:
"surferdude2" wrote in message ... Consider using the freeware 'XXCOPY' (http://www.xxcopy.com/xcpymain.htm) to do that job. I created a structure similar to what you described and did a quick batch file. It seems to do what you want: Code: -------------------- xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy xxcopy /clone /yy F:\projectsxxcopy F:\projects\ RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. I think shools should test students for criminal apptiude so they know they aren't cut out for it and can lead more productive lives. Doubtful time in a correctional facility will cure you and the citizens will be paying for your keep the rest of your life. Wasting other peoples lives too, your family included. I'd say 240grains of lead is the only thing to cure the two of you. Don't really care if that's not what the two of you are doing. Spreading this kind of crap makes you guilty too. http://www.missingkids.com/ Anyone still wondering why newsgroups are going away. WindowsXP ??????????????????????????? |
#44
|
|||
|
|||
Delete all files except one folder
On Fri, 18 Jun 2010 05:42:45 -0400, "T Shadow" wrote:
"surferdude2" wrote in message ... Consider using the freeware 'XXCOPY' (http://www.xxcopy.com/xcpymain.htm) to do that job. I created a structure similar to what you described and did a quick batch file. It seems to do what you want: Code: -------------------- xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy xxcopy /clone /yy F:\projectsxxcopy F:\projects\ RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. I think shools should test students for criminal apptiude so they know they aren't cut out for it and can lead more productive lives. Doubtful time in a correctional facility will cure you and the citizens will be paying for your keep the rest of your life. Wasting other peoples lives too, your family included. I'd say 240grains of lead is the only thing to cure the two of you. Don't really care if that's not what the two of you are doing. Spreading this kind of crap makes you guilty too. http://www.missingkids.com/ Anyone still wondering why newsgroups are going away. WindowsXP ??????????????????????????? |
#45
|
|||
|
|||
Delete all files except one folder
liu;1222390 Wrote: -------------------- * * xxcopy /clone /yy F:\projects\project???\source\*.* F:\projectsxxcopy * xxcopy /clone /yy F:\projectsxxcopy F:\projects\ * RD F:\projectsxxcopy /s /q -------------------- Use quotes if you have embedded spaces in your path. It simply copies all project folders to an intermediate folder and then clones that folder back to the original, thus deleting all files and folders except those named projects and source. xxcopy is a great time saver for situations like yours. It worked. THANKS A LOT!!! XXCOPY is a powerful tool - use it with caution! It is extremely important to always include a target folder other than the root folder when using the /clone switch, especially if including the /yy switch which prevents any confirmation prompts. Cloning to a target root folder will wipe all data from the target folder and replace it with the source data. That's not what is usually desired, to say the least. All the best, Dude |
Thread Tools | |
Display Modes | |
|
|