Off topic renaming help.

  • This topic is empty.
Viewing 4 posts - 16 through 19 (of 19 total)
  • Author
    Posts
  • #444470
    espher
    Participant

    Try this:

     

    For ($i = 1; $i -le 3; $i++) {
    $filesArray = Get-ChildItem -Path "F:scripttest" -Recurse | Where {$_.Name -Match "[^u0020-u007F]"}
    $filesArray | ForEach-Object {
    $newFileName = [Text.Encoding]::ASCII.GetString([Text.Encoding]::GetEncoding("Shift-JIS").GetBytes($_.Name))
    $newFileName = $newFileName.Replace('?','_').Replace('','_')
    If ($_.Name -ne $newFileName) {
    $increm = 1
    $testName = $_.FullName.Replace($_.Name,$newFileName)
    While (Test-Path -LiteralPath $testName)
    {
    $nextName = ([iO.FileInfo]$newFileName).BaseName + "_($num)" + ([iO.FileInfo]$newFileName).Extension
    $testName = $_.FullName.Replace($_.Name,$nextName)
    $num += 1
    }

    Move-Item -LiteralPath $_.FullName -Destination $testName
    Write-Host $_.Name
    Write-Host $newFileName


    }
    }
    }

     

    I didn’t try to get it to do folders first and files second – I just made it loop the function three times so it should get folders, then any files/folders in the first folder, then any files/folders in the second folder. I don’t know if it’ll break compatibility with the game. It’s also going to give you a bunch of gibberish filenames, e.g.

     

    _`_D_h_D____________ – _R___s___[_^_[____________

    _A_____J – STAR TREK

    _A___p___}__ – _A___p___}_____}_[_`

    _C_C_g__ – _E_L_E_LWATCHING

     

    I hate to use -LiteralPath instead of Path because sometimes the renamed path would have characters PowerShell uses as escape characters (e.g. `), and I had to use Move-Item instead of ren or Rename-Item because Move-Item takes -LiteralPath and Rename-Item does not. <img decoding=” src=”/wp-content/uploads/invision_emoticons/default_SA_wink.gif”>

    #444491
    TomGuy
    Participant
    So I’ve been stumped on something for a little while, and I figured it couldn’t hurt to ask here.

     

    Have we heard of Pop’nMusic? Stepmania? Maybe? Cool.

     

    I saw StepMania and I got excited. Didn’t know anyone else actually played it besides me, ha ha.

     

    Yeah. I’ve been playing stepmania on and off for like 10 years. It’s relaxing. I’m making a song at the moment.

     

    That’s awesome! Same here, played it on and off for around 10 years. You have a pad hooked up to it or do you just play with the keyboard?

    #444567
    b4mv
    Member

    I play on keyboard mostly, I’d rather play in an arcade if I’m gonna be on pad.

    I do have a pad for those rare moments, or if I want to test songs before I release them.

     

    One of these. They’re really good actually.

    You can see it standing up in the corner of my picture here.

    #444642
    TomGuy
    Participant

    That’s a pretty nice looking pad. I got mine from DDRgame (http://www.ddrgame.com/dance-dance-revolution-ps-tournament.html). I haven’t been able to use it as often as I like but it’s better than the old soft pads I used when I first started!

Viewing 4 posts - 16 through 19 (of 19 total)
  • You must be logged in to reply to this topic.
Back to top button