IOException: The filename, directory name, or volume label s

Any questions? Need some help?
Post Reply
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

IOException: The filename, directory name, or volume label s

Post by Evo »

Not really sure what's going wrong here.
The command im using is:
"C:\Program Files\FileBot\filebot.cmd" -rename "G:\Downloads\" --format "G:\TV\{n}\Season {s}\{n} Season {s} Episode {e} {t}"

IOException: The filename, directory name, or volume label syntax is incorrect
java.io.IOException: The filename, directory name, or volume label syntax is inc
orrect
at java.io.WinNTFileSystem.canonicalize0(Native Method)
at java.io.Win32FileSystem.canonicalize(Unknown Source)
at java.io.File.getCanonicalPath(Unknown Source)
at java.io.File.getCanonicalFile(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentBean.getFiles(Unknown Source)
at net.sourceforge.filebot.cli.ArgumentProcessor.process(Unknown Source)

at net.sourceforge.filebot.Main.main(Unknown Source)
Failure (░_░)
Hobit
Posts: 2
Joined: 24 Nov 2011, 01:49

Re: IOException: The filename, directory name, or volume lab

Post by Hobit »

Evo wrote: "C:\Program Files\FileBot\filebot.cmd" -rename "G:\Downloads\" --format "G:\TV\{n}\Season {s}\{n} Season {s} Episode {e} {t}"
Try it without the backslash on your downloads directory.
So, "C:\Program Files\FileBot\filebot.cmd" -rename "G:\Downloads" --format "G:\TV\{n}\Season {s}\{n} Season {s} Episode {e} {t}"
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

EDIT: Thanks! Worked a treat :)
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

Getting the same issue again.
If I start the GUI of Filebot up and do it manually, it works a treat. If I do it via command line using:

Code: Select all

"C:\Program Files\FileBot\filebot.cmd" -rename "G:\Downloads\" --format "G:\TV\{n}\Season {s}\{n} Season {s} Episode {e} {t}"
It doesn't work. Any ideas?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Same issue, same solution. ;) Just ditch the last blackslash. Use "G:\Downloads" instead of "G:\Downloads\".

Btw are you using 2.5? Or an older version?

This works for me:

Code: Select all

filebot -rename "G:/Downloads/" --format "G:/TV/{n}/Season {s}/{n} Season {s} Episode {e} {t}"
TIP: Always use "/" instead of "\", works the same but you won't run into string escape issues.
:idea: Please read the FAQ and How to Request Help.
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

Sorry, I meant I was using:

"C:\Program Files\FileBot\filebot.cmd" -rename "G:\Downloads" --format "G:\TV\{n}\Season {s}\{n} Season {s} Episode {e} {t}"


I'm using 2.5 but i'll try swapping the slashes around and let you know in a minute
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

Ok, it appeared to work. Still got a load of Java.IO exceptions but the renaming worked.

BTW: Any way to create an event log entry or firing off an email to say "TV Show Name, Season 1 Episode 1 has been added to the library" or something similar?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Depends, what IO Exceptions do you get? What does it say? Or is it just warnings?

Well, you can do all kinds a stuff via FileBot/Groovy scripting. The rename() function will return the destination paths. Maybe you can do like a sendmail with that.

Code: Select all

def paths = rename(...)
paths.each {
execute("sendmail", ...)
}
Something like that, but I have no idea how to create windows log entries or cmds to send email from windows. If you find a solution for that then it's on problem to combine that with FileBot/Groovy scripting.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Some HTPC software like XBMC allows other apps to talk to it via telnet or http requests. Scripting supports that as well, check the last view lines of the sorty.groovy sample script.
:idea: Please read the FAQ and How to Request Help.
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Found this, but at least on my Windows 7 it doesn't work:
http://technet.microsoft.com/en-us/libr ... 90899.aspx

Like I said, with scripting you can do pretty much anything, but you have to find a working solution yourself... btw what is the purpose of these notifications? Kick-off some other application?

Cause if you just wanna check the rename history. Why don't you just use FileBot?? GUI/CLI all log to the same xml file. And you can check it in the Rename History Viewer in the GUI app.
Image
:idea: Please read the FAQ and How to Request Help.
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

In Windows you can create events using eventcreate.exe in the System 32. Its quite easy to do:
http://support.microsoft.com/kb/324145

I'll have a play with the Groovy scripting thing. Never used it before so will have to see :)
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Does it work for you? I tried that but it's always Errror: Permission denied.

But if that cmd works for you then you can use scripting and do execute("eventcreate", "/ID", "1000", ...)
:idea: Please read the FAQ and How to Request Help.
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

Yep it works for me. Make sure you're running it as admin.
Its easy enough to create an event
C:\Users\A185306>eventcreate /l APPLICATION /so Filebot /t Information /id 431 /
d "The program {PROGRAM NAME} - {SEASON} {EPISODE} has been added to the library"
The only problem is that Filebot would have to support the ability to pass the variables in { } to a command line. Not sure if this is something that can be done?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Had to adjust some small things internally so you'll need to update.

This should work with r939:
http://sourceforge.net/projects/filebot ... ebot/HEAD/

Code: Select all

args.eachMediaFolder() {
	def paths = rename(folder:it)
	
	// log rename history
	paths.each {
		def msg = "${it.name} has been added to the library"
		execute("eventcreate", "/l", "APPLICATION", "/so", "FileBot", "/t", "Information", "/id", "431", "/d", msg)
	}
}
:idea: Please read the FAQ and How to Request Help.
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

rednoah wrote:Had to adjust some small things internally so you'll need to update.

This should work with r939:
http://sourceforge.net/projects/filebot ... ebot/HEAD/

Code: Select all

args.eachMediaFolder() {
	def paths = rename(folder:it)
	
	// log rename history
	paths.each {
		def msg = "${it.name} has been added to the library"
		execute("eventcreate", "/l", "APPLICATION", "/so", "FileBot", "/t", "Information", "/id", "431", "/d", msg)
	}
}
Oh wow! :D Thanks a lot :)

I take it this will log for every file it renames?
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Yep, pretty readable right? paths.each... :D

Probably an overkill on events, but I guess you can modify this script here pretty easly to log things the way you like it.
:idea: Please read the FAQ and How to Request Help.
Evo
Posts: 16
Joined: 30 Jan 2012, 19:54

Re: IOException: The filename, directory name, or volume lab

Post by Evo »

EDIT: Brilliant, it worked successfully.

I saved the .groovy script in my program files and ran this command:
filebot -rename "G:/Downloads" --format "G:/TV/{n}/Season {s}/{n} Season {s} Episode {e} {t}" --db thetvdb -script "C:/program Files/FileBot/sort.groovy" -trust-script
TV Show renamed and event log entry created :)
ari1010
Posts: 2
Joined: 29 Jun 2016, 11:57

Re: IOException: The filename, directory name, or volume lab

Post by ari1010 »

hi having a issue and my script works on one pc but not on this one keep getting this error

Code: Select all

C:\Users\download>filebot -script fn:amc --output "//ix2-dl" --action copy --conflict skip -non-strict --log-file amc.log --def unsorted=y music=y artwork=y "ut_label=%L" "ut_state=%S" "ut_title=%N" "ut_kind=%K" "ut_file=%F" "ut_dir=%D"
Locking C:\Users\download\AppData\Roaming\FileBot\logs\amc.log
Run script [fn:amc] at [Wed Jun 29 07:53:53 EDT 2016]
Parameter: unsorted = y
Parameter: music = y
Parameter: artwork = y
Parameter: ut_label = %L
Parameter: ut_state = %S
Parameter: ut_title = %N
Parameter: ut_kind = %K
Parameter: ut_file = %F
Parameter: ut_dir = %D
Invalid argument
java.io.IOException: Invalid argument
        at java_io_File$getCanonicalFile.call(Unknown Source)
        at Script1.run(Script1.groovy:15)
        at net.filebot.cli.ScriptShell.evaluate(ScriptShell.java:62)
        at net.filebot.cli.ScriptShell.runScript(ScriptShell.java:72)
        at net.filebot.cli.ArgumentProcessor.runScript(ArgumentProcessor.java:114)
        at net.filebot.cli.ArgumentProcessor.run(ArgumentProcessor.java:29)
        at net.filebot.Main.main(Main.java:120)
Failure (┬░_┬░)


pls and help would be great
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

--output folder must be a folder.

\\server is not a folder.
\\server\share might be a folder.
:idea: Please read the FAQ and How to Request Help.
ari1010
Posts: 2
Joined: 29 Jun 2016, 11:57

Re: IOException: The filename, directory name, or volume lab

Post by ari1010 »

Just find it odd that it works flawlessly on my other pc and not this one. Going to have to do some digging in to my network.

Thanks
User avatar
rednoah
The Source
Posts: 22923
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: IOException: The filename, directory name, or volume lab

Post by rednoah »

Newer versions of FileBot fail immediately if you pass in bad parameters. Older versions may accept invalid parameters and kinda work kinda not work depending on various other parameters.
:idea: Please read the FAQ and How to Request Help.
Post Reply