Jump to content

reload05

Members
  • Posts

    6
  • Joined

  • Last visited

Everything posted by reload05

  1. I just wanted to thank both of you guys! I'm VERY new to coding and I'm really excited to say that it works! I had to change a few things, but it works PERFECTLY! Here's the code I used: ; Shows the filenames of all files in the current directory, note that "." and ".." are returned. $search = FileFindFirstFile("c:\*Temp*") ; Check if the search was successful If $search = -1 Then MsgBox(0, "Error", "No files/directories matched the search pattern") Exit EndIf While 1 $file = FileFindNextFile($search) If @error Then ExitLoop If StringInStr($file, "Temp") and FileGetAttrib("C:\" & $file) = "D" Then DirMove ("C:\" & $file, "C:\backup", 1) WEnd ; Close the search handle FileClose($search) I removed the line If $file = "temp" Then ContinueLoop and replaced DirCopy with DirMove and everything worked out perfect. Thanks again guys for helping a newb!
  2. Are you sure that is the code sykes? I ran it, and it didn't work. Does the FileFindFirstFile command work with directories, or just files?
  3. Ok, let me see if I can explain what I need my script to do. This should be easy for the experts, but I'm not sure how to go about doing this. I need to rename a directory with the word "temp" in it to a constant name. For instance, I want to rename D:\temp to D:\backup. But the trick is, D:\temp could be anything, but it will have the word temp in it. For example, D:\temp could be D:\454545454temp5656565 and I need it to rename it to D:\backup. As long as that directory has the name "temp" somewhere in the name, I want it to rename it to D:\backup. I tried using wildcards, but I guess that is just illegal. Here is what I had: DirMove ( "D:\*temp*", "D:\backup",1 ) Any suggestions on how to go about doing something like this?
  4. byteme you are AWESOME! I think you got it! PLEASE pm me with your paypal account info. I'll get the funds to you ASAP! I'm REALLY excited! Edit: Dude, you gotta take the 20 bucks. This REALLY helped me out!
  5. This is a repost, but I couldn't edit my topic on the last post. Sorry. I wanted to add the paypal info to the title. Ok guys, I'm a total newb and have only created one Autoit script which was pretty basic. But now I need a script, and I need it BAD. I simply don't have time to do this manually. I have to automate the process. Anyway, here is what I need the script to do: I have a file called test.bpi (can be open and edited with notepad). In that file I need to search for all instances of a word (example: computer1) and replace it with the current computer name. Once that's done, I need to save it (with the same file name as it started with). The next thing the script needs to do is to kick off a cmd file (example: test2.cmd). The thing is, I need to execute it from a command prompt and it has to wait 10mins before it kicks off the next two cmd files. After each command file, I'd like it to wait 10mins before kicking off the next. And finally, once the last cmd file has run and the script has waited 10mins, I'd like for it to reboot the machine. So basically the script layout looks like this: 1. Find word in file test.bpi, save it. 2. run test2.cmd from command prompt, wait 10mins. 3. run test3.cmd from command prompt, wait 10mins. 4. run test4.cmd from command prompt, wait 10mins. 5. reboot I think it is easy for someone that is really good with AutoIt to do this. Actually, I'm sure this would be pretty easy for some. But I've never done programming in my life, so I don't even know where to start with this thing. Anyway, If you guys can help me out, I'd be VERY appreciative! smile.gif Thanks! Edit: Oh, I'm using AutoIt v2. Whoever is the first person to write a working script (using AutoIt v2 or 3 that I can compile as an exe) that satisfies the above criteria by May 1st, 2005, I'll paypal them $20. I think this is easy for the pros so it can be a quick $20 for you. Thanks again guys!!!
  6. Ok guys, I'm a total newb and have only created one Autoit script which was pretty basic. But now I need a script, and I need it BAD. I simply don't have time to do this manually. I have to automate the process. Anyway, here is what I need the script to do: I have a file called test.bpi (can be open and edited with notepad). In that file I need to search for all instances of a word (example: computer1) and replace it with the current computer name. Once that's done, I need to save it (with the same file name as it started with). The next thing the script needs to do is to kick off a cmd file (example: test2.cmd). The thing is, I need to execute it from a command prompt and it has to wait 10mins before it kicks off the next two cmd files. After each command file, I'd like it to wait 10mins before kicking off the next. And finally, once the last cmd file has run and the script has waited 10mins, I'd like for it to reboot the machine. So basically the script layout looks like this: 1. Find word in file test.bpi, save it. 2. run test2.cmd from command prompt, wait 10mins. 3. run test3.cmd from command prompt, wait 10mins. 4. run test4.cmd from command prompt, wait 10mins. 5. reboot I think it is easy for someone that is really good with AutoIt to do this. Actually, I'm sure this would be pretty easy for some. But I've never done programming in my life, so I don't even know where to start with this thing. Anyway, If you guys can help me out, I'd be VERY appreciative! Thanks! Edit: Oh, I'm using AutoIt v2.
×
×
  • Create New...