DSOClient easy delete thingie

Discussion in 'General Archive' started by _Baragain_, Apr 16, 2015.

Dear forum reader,

if you’d like to actively participate on the forum by joining discussions or starting your own threads or topics, please log into the game first. If you do not have a game account, you will need to register for one. We look forward to your next visit! CLICK HERE
Thread Status:
Not open for further replies.
  1. _Baragain_

    _Baragain_ Living Forum Legend

    Nope, I'm lazy and used www.wordcounter.net. I'm not even joking. The unofficial motto of my job is "Work Smarter, Not Harder." Why do the work when there is a tool that can do it for you.

    For example, write a CMD line script that can delete the DSOTemp folder and keep it on the desk top... having issues? Double click, wait a couple of seconds for script to run and exit, restart DSO.
     
    Darwarren likes this.
  2. Guitarman

    Guitarman Forum Master

    That is an excellent idea.... :)

    I am not sure whether it is ok to post it here but appreciate it if you can assist :)

    I hate to type %appdata% and scroll thru the folder whereas your solution is just a click and I can go watch DSO anders movies when it is finally available in my country xD
     
  3. _Baragain_

    _Baragain_ Living Forum Legend

    I'll tell you how to do it, but it come with the explanation and warning.

    The command is
    Code:
    rd /s /q <directory_to_be_deleted>
    Simplified, it could simply be typed like this:
    Code:
    rd /s /q %temp%\DSOClient
    This is typed in a notepad document and saved as ClearDSOClient.bat

    Now, I'll explain what each thing means.

    The command "rd" is short for remove directory.
    The "/s" makes it delete all sub-directories as well.
    The "/q" makes it not ask for confirmation (i.e. "Are you sure you want to do this".)
    The <directory_to_be_deleted> would be the location of your DSOClient folder. Easiest way to find this is to type %temp% in your Start Menu search and hit enter. From there, click on "DSOClient." Then right click in the address bar at the top and hit "Copy address as text." From there, paste it into the notepad document. It usually looks something like this "C:\Users\YourNameHere\AppData\Local\Temp\DSOClient" but your's may be different (possible, but unlikely). To avoid all those potential problems, just use the second version.

    If any of you think I'm trying to trick you or that I am lying to you, you are welcome to ignore me (I am only attempting to assist Guitarman as he asked), but any Windows power user can confirm that I speak the truth.

    Now for the warning.
    The "rd" command, especially coupled with the "/q" modifier, is very powerful. It will delete the file path you indicate, and it will not ask for your permission. It will not go to your recycling bin, it will just be gone! Use with caution.
    Do not blame me, the moderators, or BigPoint if you use this and you mess up! This is intended to be an idea generating post for the power users in DSO and if you feel even the slightest bit iffy about trying this, dont! The normal way of deleting the DSOClient folder works very well.

    P.S. There are other commands for things like clearing the Java cache, doing the DNS Flush (which is done in the command line to begin with) and several of the other troubleshooting steps. It is also possible to put together a catch all script that hits all the big ticket troubleshooting steps and once the script is written, it takes seconds for me to do what takes most people several min to do. "Work Smarter, Not Harder."
     
    Last edited: Apr 18, 2015
  4. All forum users, Take note! I'll leave the post because it does serve a purpose and has merit, but do such things at your own peril!

    A couple of mistyped lines in a command line can make for a very bad day.
    [​IMG]
     
    Trailboss1 likes this.
  5. MegaNuker

    MegaNuker Forum Ambassador

    "%temp%/DSOClient" is the variable that is used in java.
     
  6. trakilaki

    trakilaki Living Forum Legend

    I got better "codding". :D
    Once you are in TEMP folder right click on DSOClient folder from menu chose -> send to -> desktop(create shortcut) .
    There you go ... you can one click delete everything inside. :p
     
  7. MegaNuker

    MegaNuker Forum Ambassador

    The amount of time it takes to delete via the gui is high for me.

    I have a script that renames to folder to the name with time. I used to use date but I had to do it 2 times in a day and it failed changed it to time and never changed it back.

    This is also a suggestion for people with SSD since deleting does move you to the total writes barrier. I currently am using 4% of my drive and have 81 DSOClient folders.
     
    _Baragain_ likes this.
  8. _Baragain_

    _Baragain_ Living Forum Legend

    Good point about the solid state drives. I've been meaning to fill one of my bays with a SSD, so I'll have to keep that in mind when and if I do. That is as simple as changing a line of the bat file.
     
  9. Guitarman

    Guitarman Forum Master

    woo.. finally found it
    Can't remember where I posted the question and just realise it is a new thread :)

    Anyhow, thanks all for sharing. . :) will try it out soon.

    Too bad I can't meet you guys in Tegan.
     
  10. Darwarren

    Darwarren Count Count

    My Anti-Virus program has a "Run File Cleanup" command. It a simple tool for deletions. 3 clicks to open and run, 2 seconds, and a click to close. Files gone, job done.
     
  11. MegaNuker

    MegaNuker Forum Ambassador

    renameme.bat

    Code:
    @echo off
    move Mod_Rename.BAT %temp% > nul
    cd %temp%
    call Mod_Rename.BAT
    move Mod_Rename.BAT DSOClient > nul
    cd DSOClient
    Mod_Rename.BAT

    Code:
    @echo off
    FOR /F "tokens=1-4 delims=:." %%A IN ("%time%") DO ( Set rename=DSOClient%%A%%B%%C%%D)
    ren DSOClient %rename%
    md %temp%\DSOClient
    move %temp%\%rename%\renameme.bat %temp%\DSOClient > nul
    
    Place both files in your DSOClient folder.
    This will not destroy anything on your drive but move it to a new name.
     
  12. _Baragain_

    _Baragain_ Living Forum Legend

    Seems overly complicated, but it works.

    I prefer a more streamline approach that does not involve multiple batch files or having to locate them in the proper directory.

    What do you think of this?
    Code:
    FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (
    SET /A DAY=%%A
    SET /A HOUR=%%B
    SET /A MINUTE=%%C
    SET /A MONTH=%%D
    SET /A YEAR=%%F
    )
    
    ren %TEMP%\DSOClient DSOClient_%YEAR%_%MONTH%_%DAY%_%HOUR%_%MINUTE%
    Reason I like this a bit more is because it is easy to read logiclly and the date format is easily rearanged to user preference. Also, it is independent of the user's local %DATE% and %TIME% short format settings.

    PS: Thanks for making me think... I'll defintly keep this for when I get my solid state installed.

    PPS:To anyone who would like to use this, DSO must be closed at the time this scrip it run or it will fail because a folder in use cannot be renamed
     
    Last edited: Apr 18, 2015
  13. MegaNuker

    MegaNuker Forum Ambassador

    Well this would work if you kept it outside of the DSOClient folder.

    My organization is to keep all files grouped together.

    Not sure why you used set if your not keeping the value. This is how i would reword it.

    Code:
    FOR /F "skip=1 tokens=1-6" %%A IN ('WMIC Path Win32_LocalTime Get Day^,Hour^,Minute^,Month^,Second^,Year /Format:table') DO (ren %TEMP%\DSOClient DSOClient_%%F_%%D_%%A_%%B_%%C)
    PS: This can be typed via cmd line also. Hmm just put in a text file cut and paste...
     
    Last edited: Apr 18, 2015
  14. _Baragain_

    _Baragain_ Living Forum Legend

    I dont like haveing to go to the file location to have to run a bat. I just have a batch script folder that I keep on my desktop.

    Also, I just wrote this yesterday. If I were using it for myself, I would do it as you described, but I figured as I was writing it for the forums so that it could be used, I would make it more layperson friendly. Because I set all the variables, a layperson could edit the ren line's FileName2 based on the format they want. For example, if they want to do this monthly, they could edit the .bat to DSOClient_%YEAR%_%MONTH% or if they aren't going to do it more than daily (like you do), they could get away with DSOClient_%YEAR%_%MONTH%_%DAY%. Generally, when I code, I focous on readability, scaleability, and simplicity (and generally in that order too).
     
  15. MegaNuker

    MegaNuker Forum Ambassador

    Will I use shortcuts and that is why items are moved back. The one liner just is for a cut and paste idea. Yes when programming should always use terms to help someone else that comes behind you. People do get fired. One programmer even wrote a payroll file that if he was fired he would still get paid.

    I always used the remark lines to explain variables %1 %%A and &&1 so I do see your point.
     
    _Baragain_ likes this.
  16. _Baragain_

    _Baragain_ Living Forum Legend

    You don't need to be the smartest person alive, just smarter than everyone you worrk with.
     
  17. Trailboss1

    Trailboss1 Forum Mogul

    <-- **deer caught in the headlights look and a little droll falling from the corner of mouth**
     
Thread Status:
Not open for further replies.