Jump to content

xinehp

Member
  • Posts

    4
  • Joined

  • Last visited

  • Donations

    0.00 USD 
  • Country

    United States

About xinehp

  • Birthday 08/23/1991

Profile Information

  • OS
    Windows 7 x64

xinehp's Achievements

0

Reputation

  1. @xinehp, welcome to MSFN - there's always going to be multiple ways to write a script, and multiple languages or script environments/parsers to do it in. And it's also worth noting that Java and JavaScript (while both contain the word java) are in no way related. JavaScript, VBScript, PowerShell, and .cmd/batch file execution are all native to Windows 7 / Server 2008 R2. It appears there are multiple scripts in this thread, in multiple parsers and languages which will achieve what you would like to achieve. Let us know which one (or ones) work for you, and remember that using a specific language or parser to write a script is only easy because you know how to use it. I must reiterate that while you can use a .cmd in Windows 7, you should consider learning things like VBscript, Javascript, and PowerShell for administrative scripts simply because they're far more powerful, and they are all (frankly) very easy to use once you learn how to write for them. Yeah, I'm beginning to understand that. I'm just victimized by academia's obsession with Java Learning another language is definitely on the todo list, but I only have a 1-core brain. I must apologize to coffefiend for completely ignoring his solutions, I'm incredibly less knowledgeable about Windows than I thought, and his powershell line is freaking elegant. I'm still using my knowledge from 4 years ago writing .cmds to mess with the computers at high school I didn't know powershell existed, and I didn't think vbscript came with a native compiler. Thanks MSFN, I was initially expecting very little replys, from experience on other forums, but you guys are incredibly active (especially mods) and got it in no time, well done.
  2. hmm... I guess I do know enough Java to write it, then just write a .cmd to run the java file.. I think if someone know how to do it in batch that would be simpler. All done, guys. I already downloaded java, set windows 7's environment variables so i can use java through command lines, and wrote the java program. Thanks for attempting to help I thought maybe someone would just know how to do it in batch off the top of their heads, but I guess not.
  3. In addition to that, since we are completely unaware of which Operating System you are using, (important for determining the best solution), I''d suggest changing it to: (Change the drive letter in red to match your source drive.)Not only do I find it a better formatted result, you should always have rights to place the output file on your Desktop where you can find it. I'm running Windows 7. I use fraps to record gameplay video to an external hard drive in E:\fraps\, my operating system is on drive C:\. The dir /s does appear to list them in the correct order, is there a way to delete the last file on that list? That is the only functionality that I need, to delete the last created file in a directory. To clarify the original post, mydirlist.txt
  4. Moderator Note The OP was looking for a script which would delete the most recent file within a directory, (identified as E:\Fraps) To further help other readers, CoffeFiend posted some great solutions, thanks!
×
×
  • Create New...