Reputation: 5 Worker
- Active Members
- Active Posts:
- 87 (0.05 per day)
- 21-March 09
- Profile Views:
- Last Active:
- Apr 07 2014 11:38 AM
- OS Preference:
- Favorite Browser:
- Favorite Processor:
- Who Cares
- Favorite Gaming Platform:
- Your Car:
- Dream Kudos:
Posts I've Made
Posted 6 Apr 2014okay i'm in the directory my jar is in and i try to run it on my test directory: java -jar fileRenamer c:\documents '^various - [^ ] - ' ''
and I get this:
error: unable to access jar file fileRenamer
I did test and then run it through eclipse and it worked great! I would like to know why it wouldn't work from command line though.
Posted 6 Apr 2014okay I have 570 sub-directories of my "karaoke" directory with 17,000 files in them. some have "various - x - " at the beginning of their filenames. I want to find those and chop of that first part of the string from 0 to the 4th space. passing my replacement string seems impossible because they need to keep the rest of the name. So if I change ROOT to = c:\karaoke and args to "various" and args to a subString of the file name then I can just run it in Eclipse. Right? Each song has two files associated with it an .mp3 and a .cdg, but searching for "various" will grab them both because the only difference in the filenames is their extensions (if that's wrong please tell me before I blow it up!). Also, I can never make my java stuff work outside Eclipse before and don't remember what I need to change to make it work. Thanks again for you time and patience!
okay I just brushed off some regex notes and I see how to pass in my regex and replacement.
if my filename is "various - 1 - artist tracknumber song.mp3" then
regex = "various - [1-9]|1[0-9]|2[0-9] - " //and I can just replace with "".
Posted 6 Apr 2014Wow. Goose that's way above my pay grade! lol I think I see how it's supposed to work. So when I run the program I type the ROOT Path in after the program name and that gets passed as the args right? If you could add some more comments that would be great. I have a bunch of files with "various - blah -" at the beginning of their names. I just want to rename them to a substring of the original name, which it looks like that is taking place in "FileVisitResult". Do I have that right? You'd think they'd teach us this stuff in school huh? Thanks again for all the great help!
Posted 5 Apr 2014Thanks Casio! I was finally getting ready to start this and was tripping over looking in the directories. I don't see how to make it look in the sub-directories though. Like c:\music\karaoke\blahblah\filename.mp3 I have god knows how many folders with files to rename, but they are all sub-directories of the same directory. Thanks so much for the help!
Posted 31 Mar 2014It looks like "move()" is the one I need. thanks modi.
- Member Title:
- D.I.C Head
- 39 years old
- May 30, 1974
- Brighton, Michigan
Wow, um game development is the final goal. I want to get into educational games and make them not suck ass for middle school aged kids. I have four kids, who are all just super and a very loving and supportive wife. I love family time and activities.
Of course I love games, from board games to pc and counsel games.
- Years Programming:
- Programming Languages:
PJLabowski hasn't added any friends yet.