Jump to content

Batch File and Wildcards...headache


Guest

Recommended Posts

Posted

do you just need the username in there? Then use the environment variable %username%

C:\Users\%username%\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines

C:\Users\%username%\Virtual Machines

"Cheap, good or fast. You can only pick two out of three."

"Have money? Love story! No money? I'm sorry."

Posted

i need to delete both folders and their contents for every user on each computer. users will be different for each computer

ill try both ideas out when i get to work, ill let you guys know how it goes

Posted

@echo off

for /d %%d in ("%userprofile%\..\*.*") do rd "%%d\AppData\Local\Microsoft\Windows Virtual PC\Virtual Machines\" /s /q

@echo off

for /d %%d in ("%userprofile%\..\*.*") do rd "%%d\virtual machines\" /s /q

and yes i tried \virtual machines\*.*

but it doesnt work :/ this is the best i could come up with.. ive been looking how to clear out the files and not the folder for two hours.. hope i helped

also please be aware that this is a HOT batch file.. meaning that it will destroy all data on every single user profile (except hidden ones) in the specified folders.

this is a working batch file for your needs, i just wish it didnt delete the final "virtual machines" folder and instead deleted all the files inside.

to get this to work (in case you dont know how) make a new text document and copy and paste the above into it, save it and fix the extension to .bat.

or if you know a faster way to make a .bat file, open the .bat file and edit it and paste the above into it.

this batch file has no pause command so all you will see is a flash on the screen then its done

it worked perfect man! i needed the folder deleted as well so it all worked out great. boss man is very happy :D

Posted

np kranny, glad i could be of service to you sir :]

09 Civic EX

KDC-X395

(2) SKAR Audio VVX-12

Skar Audio SK-1500.1

4 cu ft @32 (new box and more port soon)

Firing Forward not sealed off

Stock 80 Amp Alt

Big 3 In 1/0 Knu

2 Runs To The Back 1 Pos 1 Neg In 1/0 Knu

DD-1'd 13.8v drop

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Who's Online   0 Members (See full list)

    • There are no registered users currently online
×
×
  • Create New...