Jump to content
Sign in to follow this  
RacecarSoft

Wild Card...

Recommended Posts

RacecarSoft

Is there a way to have a wild card? Like if I wanted to make a script that deleted all folders beginning with "EX_*" (where * is a wild card, meaning that no matter what was after EX_, it would be deleted).

Where you would use it like this:

DirRemove("C:\Program Files\Example\EX_*")

Thanks! ;)


[s]Visit My Website[/s] (this isn't up 24/7). (SITE DOWN) This is now a HP MediaSmart site, I'm trying to get my server working the way I want it to.24/7 site (make sure you have noscript, sorry!): 24/7 [u]WARNING: MUST have NoScript so you can block quantserve/quantcast![/u] If you don't, the evil freewebs/webs/quantcast/quantserve/WHATEVER virus will get you![spoiler]Hey, look! It's a spoiler![/spoiler]Software: KeyPress, Advanced Calculator (not autoit), WUK (Windows Update Killer)my account over a year old : >... I do Linux.

Share this post


Link to post
Share on other sites
computergroove

depending on the OS you could call a command window and type the dos command for doing such a thing.

Example:

Send("{ctrldown}{esc}{ctrlup}");opens the start menu
send("rrr{enter}");highlights the run command on the start menu and hits enter
send("cmd{enter}");types the command for the command line prompt in windows xp and hits enter
send("cd \{enter}");brings the prompt to the root directory of c:
send("del C:\Program Files\Example\EX_*{enter}");delets the content you are talking about
sleep(30000);waits 30 seconds for the program to complete the deleting
send("!{f4}"};closes the command prompt window

Get Scite to add a popup when you use a 3rd party UDF -> http://www.autoitscript.com/autoit3/scite/docs/SciTE4AutoIt3/user-calltip-manager.html

Share this post


Link to post
Share on other sites
weaponx

Is there a way to have a wild card? Like if I wanted to make a script that deleted all folders beginning with "EX_*" (where * is a wild card, meaning that no matter what was after EX_, it would be deleted).

Where you would use it like this:

DirRemove("C:\Program Files\Example\EX_*")

Thanks! ;)

Did you try it?

depending on the OS you could call a command window and type the dos command for doing such a thing.

Example:

Send("{ctrldown}{esc}{ctrlup}");opens the start menu
 send("rrr{enter}");highlights the run command on the start menu and hits enter
 send("cmd{enter}");types the command for the command line prompt in windows xp and hits enter
 send("cd \{enter}");brings the prompt to the root directory of c:
 send("del C:\Program Files\Example\EX_*{enter}");delets the content you are talking about
 sleep(30000);waits 30 seconds for the program to complete the deleting
 send("!{f4}"};closes the command prompt window
This is ridiculously complex.

RunWat(@ComSpec & " /c " & 'del "C:\Program Files\Example\EX_*"')

Share this post


Link to post
Share on other sites
RacecarSoft

Did you try it?

Yeah, it doesn't work, just tried again at the time of this post to make sure.


[s]Visit My Website[/s] (this isn't up 24/7). (SITE DOWN) This is now a HP MediaSmart site, I'm trying to get my server working the way I want it to.24/7 site (make sure you have noscript, sorry!): 24/7 [u]WARNING: MUST have NoScript so you can block quantserve/quantcast![/u] If you don't, the evil freewebs/webs/quantcast/quantserve/WHATEVER virus will get you![spoiler]Hey, look! It's a spoiler![/spoiler]Software: KeyPress, Advanced Calculator (not autoit), WUK (Windows Update Killer)my account over a year old : >... I do Linux.

Share this post


Link to post
Share on other sites
weaponx

weaponx

del command don`t delete a folders, only files ;)

I figured as much, I just fixed the code from above.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.