How can "multiple folders/files" be deleted in ONE PSEXEC COMMAND LINE

I can delete remote folders/files via bat command with psexec (below) but; 
It takes a little time because of the 9 different folders. Maybe, looping of txt file can be used for different folders.
So how we can delete multiple folders in ONE PSEXEC COMMAND LINE?
Here my working code but it does its job in 9 steps :(
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\1*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\2*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\3*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\4*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\5*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\6*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\7*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\8*.*") do rd /s /q "%%a""
psexec \\%PC% cmd /c "for /d %%a in ("c:\Users\9*.*") do rd /s /q "%%a""
\_(ツ)_/ twitter.com/serdaruzun

I think it is:psexec \\%PC% cmd /c "for /l %%n in (1;1;9) do for /d %%a in ("c:\Users\%%n*.*") do rd /s /q "%%a""
\_(ツ)_/ twitter.com/serdaruzun

Similar Messages

  • How can multiple check boxes be added at one time to a form?

    How can multiple check boxes be added at one time to a form?

    Thanks for your response, but copying and pasting creates a link. If the user places a check mark in one of the boxes, all the rest of the boxes will have a check mark also. I will research this some more.
    Carol Deatherage
    Receptionist
    Novar/Honeywell
    1000 SE 14th Street
    Bentonville, AR 72712
    Office:  (800) 341-7795
    Fax: (479) 271-0657
    [email protected]<mailto:[email protected]>
    Your feedback is important to us! Please take a moment to rate this response.
    Click Here to Access the Survey<https://www.surveymonkey.com/s/NovarSurvey>!
    This email and any files transmitted with it are confidential and intended solely for the individual or entity to whom they are addressed. If you have received this email in error destroy it immediately.
    Novar Confidential ***

  • How can I unsync email so deleting from one device will not remove it from all devices?

    How do I unsync email so deleting from one device will not remove it from all devices?

    Sounds like you have an IMAP/Exchange mail account (vice a POP3 account). By design, an IMPA/Exchange account synchronized your mail boxes among different devices. That behavior can't be changed.

  • How can I migrate file shares & permissions from one volume to another on the same server?

    I am replacing a storage array and as part of that process, I need to move files/folders and Shares/permissions from one Volume to another volume within the same server.
    The server is Windows 2003 file server.  The file transfers are not a problem, moving all 40 shares with permissions etc. is my main concern because in order to maintain everything I need to change the drive letter of the new volume to match the old
    one so that links to various resources throughout the network do not break.

    Hi, 
    If you want to copy files/folders from one Volume to another volume within the same server, you could use the File Server Migration Tool (FSMT) or Robocopy to accomplish your goals. The tool can move all of the files from the shares on your original volume
    to the new volume.
    For more detailed information, you could refer to the articles below:
    File Server Migration Toolkit
    http://technet.microsoft.com/en-us/magazine/2006.10.utilityspotlight.aspx
    The File Server Migration Toolkit (FSMT) is a free download available at:
    http://www.microsoft.com/en-us/download/details.aspx?DisplayLang=en&id=10268
    Robocopy
    http://technet.microsoft.com/en-us/library/cc733145.aspx
    FSMT and Robocopy will not copy Share permissions but only NTFS permissions. So if the drive letter will not be changed, you can backup and restore the Share permission with steps here:
    Saving and restoring existing Windows shares
    http://support.microsoft.com/kb/125996
    Regards, 
    Mandy
    We
    are trying to better understand customer views on social support experience, so your participation in this
    interview project would be greatly appreciated if you have time.
    Thanks for helping make community forums a great place.

  • How to sync pdf  files without deleting existing ones

    Hello Everyone,
    I am new to the apple world and i recently bought an iphone 5 and an ipad mini. i am loving using them but i am facing a problem everytime i try to sync media. whenever i upload new stuff its automatically deleting the existing stuff. how do i upload new stuff ( media and pdf's) without deleting the existing ones ??
    NEED HELP ASAP !!!
    Thank you.

    "Upload"? What does that mean to you? Syncing form iTunes? Is that what you mean? If it is what you mean, you need to select all of the content that you want to sync by setting sync preferences and once you do that, your media should not be deleted every time that you sync.
    However if you are referring to Photos as media, Yoy can only sync one folder of photos from your computer at a time. Of you switch to another photos folder, the existing photos on the iPad will be erased.
    So if you would explain exactly what you mean and what you are doing, it will be easier to offer a solution.

  • Can multiple html files be opened in one click?

    I have several ebooks that are in html format. I want to open all the files at once without clicking on each one separately. Is this poosible?

    I think it is:psexec \\%PC% cmd /c "for /l %%n in (1;1;9) do for /d %%a in ("c:\Users\%%n*.*") do rd /s /q "%%a""
    \_(ツ)_/ twitter.com/serdaruzun

  • How do I restart the SNMP agents with the original command line options?

    I'm creating an application that changes the SNMP trap target configuration files and then restarts the SNMP agent. I'm currently working with the mibiisa agent. I want to make sure that I restart the service with the new trap targets but with the original command line options. How can I restart the mibiisa service with the same command line options that it originally loaded with?

    It is not "Network Time" that is the problem, but actually "SystemStarter." SystemStarter is an interim kludge to enable the work or the old StartupItems until they can be converted to LaunchDaemons or LaunchAgents controlled by launchd. Launcd calls SystemStarter to launch all the unconverted StartupItems. ntpd is now under the control of launchd directly.
    Launchctl is the command to load and unload the plist files, but I don't think it has a mechanism to restart a daemon.
    There are start and stop commands in launchctl, but the man page indicates that they are for debugging purposes.
    I also imagine you could just kill the ntp daemon and let it restart with new settings. It is most likely set to "keepAlive" so that it will automatically restart.

  • I have deleted my private folder and do not have enough space to reinstall my operating system. How can i transfer files from my hard drive to an USB drive to free up space when the operating system isn't working. or do i need to erase disk?

    i have deleted my private folder and do not have enough space to reinstall my operating system. How can i transfer files from my hard drive to an USB drive to free up space when the operating system isn't working. or do i need to erase disk through disk utilities without erasing data (but will it delete my programs such as photoshop, office, creative suite?

    Connect the computer to another Mac and put it in FireWire Target Disk mode, or use the Disk Utility to clone the drive or image specific folders with the USB drive as the target. After you've copied off everything you want, you'll likely need to erase the drive and reinstall the applications.
    (69695)

  • How can multiple users edit and access same ACCESS file

    Hello,
    We have 2 access files and multiple users needs to edit and access those files.
    How can I enable mulitple access but only one user can edit rest of users are in read-only mode for one file and multiple access and edit on the another file.

    Hi,
    You should split your database in a front and backend. Then create two seperate front ends which you can distribute. If you need readonly you can opt for two options, setting the attributes of the file to read only or create a front end with read only forms.
    The last one takes a little more work but is safer than setting the attributes to read only because people can change that back themselfs.
    Maurice

  • How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. I tried RIGHT-CLICK and the "open dowloading folder" or something does not work! P

    How can I OPEN files I just downloaded? They're on the DOWNLOADS screen of Firefox but I can't open them even after double-clicking? And they're not on the FOLDERS as well. Even the right-click is not working ... the "open containing folder" does not work.
    == This happened ==
    Not sure how often
    == ALWAYS! ==
    == User Agent ==
    Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; Trident/4.0; GTB6.5; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2)

    Open Containing Folders is never active.

  • I keep getting the message: "what should firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    I keep getting the message: "what should Firefox do with this file" in Windows XP every time I want to download a file, e.g., adobe, excel, etc. How can this annoying message be deleted? The check box to "open file automatically" does not work!

    cor-el,
    Thanks for your prompt reply. However, the sources you gave do not seem to apply exactly to my situation. I have attached some screenshots that show what the dialogue box looks like for a pdf download, and what my settings in the Apps panel of Options are. You will note in the first screenshot that I have checked the box to handle this file type automatically; however, the next time I try to download a file of that type, the same dialogue box appears looking exactly like the one shown, so checking the "automatic" option appears to do nothing. The files to be downloaded from my Gmail messages are not generic or altered file types - they are shown as pdf, doc, docx, etc. So while your intent was good, your post did not help. Thanks anyway.

  • How can I make files in iCloud appear in folders in alphabetical order

    I'm working on Yosemite 10.10.2.  Files in folders on Desktop are listed in alphabetical order by file name.  BUT files in folders in iCloud are listed in random order.  How can I get files to be listed in alphabetical order?

    Hello mary ann from palm coast,
    I apologize, I'm a bit unclear on exactly how you are accessing your iCloud files. If you are accessing iCloud Drive throught the Finder on your Mac, you should be able to arrange and view the files by sorting by name in List View as you would otherwise. You may find the information and steps outlined in the following article helpful:
    Mac Basics: The Finder organizes all of your files - Apple Support
    Sincerely,
    - Brenden

  • How can I copy file/folders from and to hard drives? How can I have two or more windows of explorer so that I can drag and drop from one hard drive to another?

    Hi,
    I am a new customer (purchased last week) of MacBookPro (latest) and its my first ever Apple laptop.
    I am almost lost to find the operating tools.
    1. How can I copy files from hard drive to computer and vis-a-versa?
    2. Only can browse one but how can I have two or more browses at the same time like in MS windows?
    3. No right click works on track pad?
    4. Is there application/ program compatible to MS office? If so how much and how can I purchase?
    5. Is there AutoCAD program that is compatible to MS Window AutoCAD? and if yes how much and how can I purchase?
    I will very much appreciate if you could email me the with the solution/answers please.
    Regards,
    Khagendra Limbu

    1) For some reason this happens once in a while with FAT32 enabled external harddrives. I have no idea why this happens but it most easily solved by reformatting the drive. First make sure you've copied everything from the external drive to your internal harddrive. You've done this earlier so I assume you know how to do this.
    Now the reformatting part. Open Finder and go to Applications. Look for the folder called "Utilities". Click on it. In it you find a program called "Disk Utility". Click on it. Now look for the external drive. You probably see two entries for the disk. Click on the one that contains the name of the drive NOT the one that describes the disk (Like for example 320.07 GB Samsung S2 Portable Media).
    Now you see four tabs in the righthand part of the window. They're called "First Aid", "Erase", "RAID" and "Restore". Click on "Erase". This opens the tab with (amongst others) a dropdownbox (Format) and a textbox (Name) . In the dropdownbox select "Mac OS Extended (Journaled). Take note! This selection disables usage of the drive with Windows PC's. If your goal is to share the drive with Windows PC's select the MS-DOS FAT option.
    Enter a label for the drive in the textbox Name. Now click on the button "Erase". This will format the drive.
    Now when it's done you can copy back all the items you've copied to your internal harddrive earlier.
    2) Opening two windows like Explorer on Windows is opening two Finder windows on the Mac. Simply click on the background. In the menubar you items like 'Finder", "File", "Edit", "View", et cetera. Click on "File" and "New Finder Window". Do this two times. Alternatively you can click on the background and press CMD-N two times.
    3) You can right click on the trackpad. This however depends on if you've enabled the feature in System Preferences. In the topmenubar click on the Apple icon and select "System Preferences". Now look for Trackpad in Hardware. Click on it. You see three tabs with the names "Point & Click", "Scroll & Zoom" and "More Gestures". Select "Point & Click" and look for "Secondary Click'. Make sure it is checked and make sure it has written "Click or tap with two fingers" written beneath "Secondary Click". When you're done exit System Preferences. Now select the background and tap with two fingers on the trackpad. This should open the contextuel menu with options like "New Folder", "Get Info" et cetera.

  • How can multiple vis share input from a DAQ simutaneously

    How can multiple vis share data input from a DAQ simutaneously?
    Recently I am building a EMG measurement platform and somehow DAQ data need to be shared by several vis at the same  time.
    Are there any ideas?

    If you may need to add/delete tasks that will need th edata you may want to consider a publich/subscribe pattern. Basically your DAQ task will post a message to a single queue. The process listening on this queue (message broker) will determine if there are other processes registered to receive this message. When a device registers for a message it provides a queue to receive it on. The message broker will then post the message to all interested processes. The nice thing about this pattern is that you have dedicated code to handle broadcasting the message and it is very easy at run time to change the number of processes that get the message. The DAQ task will always send the message and will not care how many processes are listening.
    Mark Yedinak
    "Does anyone know where the love of God goes when the waves turn the minutes to hours?"
    Wreck of the Edmund Fitzgerald - Gordon Lightfoot

  • How can I hide file names in a photostream?

    How can I hide file names in a shared photo stream on icloud.  I don't want people to see how many pictures I take at an event.  Can this be done to pictures already posted?

    The Shared Photo Stream uses the filename of the original image file as the title that is shown in the stream.  If you want to hide the original filename, export the image to a folder in the Finder, rename it, then reimport it to share it.  You can rename the files directly when exporting.
    Or, if you do not mind to change the names of the originals in Aperture use the command "Metadata > Batch change" and change the title of the image, with the option "Apply to Original file" enabled and "Add metadata from" set to "None".
    To rename the photos already shared, delete them from the Shared Album and share them again.

Maybe you are looking for

  • Problem with iTunes family sharing payment & app licenses

    Hiya, We're using iTunes family sharing with my wife since iOS8, on our iPhones (4S & 5, both with latest iOS). My account is the "Organizer" and my wife has Parental access (so she can use the same payment method, my credit card). There are a couple

  • Passowrd error many times?...

    Evening I have been reset my password 4 times and its keep saying errors...i cant use Itune from iphone and pc itune with this errors password??. the message is "your ID itune is error or your password error try later" and i keep do i forgot my passw

  • Need to disable a message on OAF page

    Hello I am getting the error "Your change to the data in the current form did not update the FTE value due to the following error: This assignment does not have a contract type effective as of 29-08-2012. Please use the Extra Details of Service form

  • Reverse Engineer

    Hi , This question is not about design but someting related to design activity.I have been assinged with a duanting task of reverse engineering i.e code to model and have to represent the flow of the business services as sequence diagrams. Is there a

  • The free update program does not accept my serial number

    I purchased my new macbook pro at June 21st, 2011. But when I tried to participate the free upgrade program, it said my serial number is ineligible.