After you run setup.exe it should leave a "cygwin" icon on your desktop. That will take you to a command prompt running bash. Cygwin sets up a virtual unix system with your windows volumes mounted under /cygdrive. Type 'pwd' to check your current directory. Type 'mount' to see where your volumes are mounted. After just use 'cd' like in DOS to get to the right directory.
Once you're in the right directory, that for loop I posted earlier should work. It will move each file that has a file name greater than 42 characters to the subdirectory 'toolong'. Make sure you create that directory first. Once you have all the long filenames in a subdirectory, you can deal with them as you please.
Removing FTP letter restrictions
Re: Removing FTP letter restrictions
We are prepared to live in the plain and die in the plain!
Re: Removing FTP letter restrictions
Just use vbscript if you are running windows, you don't have to install cygwin
copy this text into a file with the extension .vbs (like script.vbs) and run it in the folder you have your roms in, it will put long ones into a too long folder.
'---------------------
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
Set objFolder = fso.CreateFolder("too long")
For each file In files
If Len(file.Name) > 42 Then
fso.MoveFile file.Name, sFolder & "\too long\"
End If
Next
Wscript.Quit
'-------------
copy this text into a file with the extension .vbs (like script.vbs) and run it in the folder you have your roms in, it will put long ones into a too long folder.
'---------------------
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
Set objFolder = fso.CreateFolder("too long")
For each file In files
If Len(file.Name) > 42 Then
fso.MoveFile file.Name, sFolder & "\too long\"
End If
Next
Wscript.Quit
'-------------
Re: Removing FTP letter restrictions
Okay I just tried to do this but my computer illteracy is preventing me from succeeding. My roms are on my external HDD so when I put them in are they on my home directory? Or would how would I get it to read my M drive? I have no idea what 'cd" is in DOS because I'm terrible at computers. So I just tried to use the loop that you posted earlier but do not think I am typing it correctly " am I suppose to type "for each in *; do if [$(basename "$each" | wc -c) -gt '42']; then mv "$each" toolong; fi; done" or am I just suppose to type "[$(basename "$each" | wc -c) -gt '42']; then mv "$each" toolong; fi; done". Last I do not know what symbol the bolded is [$(basename "$each" | wc -c) -gt '42']; then mv "$each" toolong; fi; doneHatta wrote:After you run setup.exe it should leave a "cygwin" icon on your desktop. That will take you to a command prompt running bash. Cygwin sets up a virtual unix system with your windows volumes mounted under /cygdrive. Type 'pwd' to check your current directory. Type 'mount' to see where your volumes are mounted. After just use 'cd' like in DOS to get to the right directory.
Once you're in the right directory, that for loop I posted earlier should work. It will move each file that has a file name greater than 42 characters to the subdirectory 'toolong'. Make sure you create that directory first. Once you have all the long filenames in a subdirectory, you can deal with them as you please.
Re: Removing FTP letter restrictions
Okay very useful thanks to everyone that helped. Got it all figured out with this.dlmvii wrote:Just use vbscript if you are running windows, you don't have to install cygwin
copy this text into a file with the extension .vbs (like script.vbs) and run it in the folder you have your roms in, it will put long ones into a too long folder.
'---------------------
On Error Resume Next
Set fso = CreateObject("Scripting.FileSystemObject")
sFolder = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
Set folder = fso.GetFolder(sFolder)
Set files = folder.Files
Set objFolder = fso.CreateFolder("too long")
For each file In files
If Len(file.Name) > 42 Then
fso.MoveFile file.Name, sFolder & "\too long\"
End If
Next
Wscript.Quit
'-------------
Re: Removing FTP letter restrictions
Yeah, but I could do it in one line. 
We are prepared to live in the plain and die in the plain!
- Hobie-wan
- Next-Gen
- Posts: 21705
- Joined: Sat Aug 15, 2009 8:28 pm
- Location: Under a pile of retro stuff in H-town
- Contact:
Re: Removing FTP letter restrictions
File Renamer Basic has been pretty good when I had a pile of stuff that needed fixing.
I've never met a pun I didn't like. - Stark
My trade, sale and services - Rough want list - Shipping weight reference chart - AC Power Adapter reference list
My trade, sale and services - Rough want list - Shipping weight reference chart - AC Power Adapter reference list
Re: Removing FTP letter restrictions
Didn't really check up on this thread since I used that script but I have found something better. Its like the same thing you posted but specifically for the xbox. Its called Pre xbox copy tool. Hopefully that helps a lot of people in the future.Hobie-wan wrote:File Renamer Basic has been pretty good when I had a pile of stuff that needed fixing.
-
gtmtnbiker
- Next-Gen
- Posts: 4320
- Joined: Fri Jan 09, 2009 1:14 pm
- Location: Massachusetts
Re: Removing FTP letter restrictions
Thanks for responding back. It's helpful when people do that. I hate when someone goes off and never supply a solution for the problem they had. Kudos to you!itsmattxp wrote:Hopefully that helps a lot of people in the future.