Translate Windows command to Linux command

Support for Windows users
Post Reply
aerrull
Posts: 1
Joined: 11 Sep 2023, 02:39
Contact:

Translate Windows command to Linux command

Post by aerrull »

Hello everyone,

With Linux and the Raspberry Pi, I'm just getting started. I was able to install an application named filebot, and I'd like to execute it from the terminal window. I have it installed on a Windows machine and it does the same thing, so it shouldn't be too difficult, but I'm not sure how to do it in Linux.

Here's an example of a line that works for me.

Code: Select all

sudo filebot -script "fn:sysinfo"
The batch script I wrote for Windows is as follows:

REM TV Renaming Filebot script

Code: Select all

filebot -script fn:amc "D:/TVcurrent" --def "seriesFormat=\\\\TITANSERVER/Series/1.Current/{n}/{episode.special ? 'Special' : 'Season '+s.pad(2)}/{n}.{s00e00}{'.'+[vf]}{'.'+[resolution]}{'.'+[vc]}{'.'+[ac]}{'.'+[af]}{'.'+[source]}{'.'+[group]}.{t}" -r --log-file "C:\Users\Kira\Dropbox\Scripts\Filebot\Logs\amc-Move.TV.log" --action move --conflict override -non-strict --def backdrops=y --def artwork=y --def clean=y --def ut_label=tv --def excludeList="C:\Users\Kira\Dropbox\Scripts\Filebot\Logs\amc-input.txt"
I'm thinking I should put everything after the word script in quotes. I'm also unsure how to instruct it on where to seek for inputs. It was now using the folder D/:TVcurrent. Also, I'm not sure how to tell it where to store the log files (that is, how to write the code so that it creates a log file in the location I specify).

Thank you in advance for any assistance you can provide.
User avatar
rednoah
The Source
Posts: 22999
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Run a program from the terminal

Post by rednoah »

:!: UNC file paths are a Windows thing. \\TITANSERVER\Series makes no sense on non-Windows platforms. The console output will tell you as much.

:idea: You need to mount the remote SMB server into the local file system. If you use Gnome or KDE, then accessing a remote network share via the UI will automatically mount that share into the local file system, usually in /media or perhaps ~/gvfs or elsewhere depending on your chosen Linux distribution and Desktop Environment. Please Google "how to mount smb share on raspberry pi" for details.

:arrow: tl;dr in Windows terms, you need to create a mapped network drive first.




:idea: You can specify the log file by specifying the absolute path to the log file, like exactly what you're doing already, except with Unix file paths instead of Windows file paths:

Shell: Select all

--log-file "/path/to/log.txt"

:idea: Please read Cmdline and Argument Passing to learn how argument passing and "..." quoted arguments work.
:idea: Please read the FAQ and How to Request Help.
Post Reply