Run .bat File On Windows That Depends On An Event In Linux

Hello, does anyone knows a way to run a .bat file in windows that depends on an event in Linux? I already have a free communication between both machines, with puttyGen, but now i have to activate a .bat file in windows when a directory in linux contains files. By crontab it will be watching that directory, and at the moment that a file arrives, the .bat file that is in windows has to fire.

Thanks for the information.


Similar Content



Urgent!! File Transfer From Windows To Linux Server Using Ftp

Dear All

I need your help.
I want to get a file from windows server using ftp.
Below is the script I have created but the connection is not established:

#!/bin/sh

lcd "directory in linux server"
USER="username of windows server"
PASS="password"

ftp -n "ip of windows server" <<EOF
user $USER $PASS

cd "C:\Users... directory in windows server where file is located"
bin
get test1234.txt

bye

EOF

I hope somebody can help me!
BR,

Linux File Server

Hello Everyone
I have installed Ubuntu Server on a 500 GB drive formatted as EXT4.

Of of my Media, movies, music and pictures are from Windows PC's formatted in NTFS.
As all of the computers connecting to the server will be windows based will NTFS be fine or will I have to reformat them to work. The two media drives are 2 x 2GB Sata drives.
Could you tell me if this setup would work or will I have to reformat and and transfer the files to a new filesystem.
Also as a file server whats the best linux file system to use so it will work with windows PC's in a lan flawlessly.
Thanks for you expertise.
Regards

How To Transfer The File From Windows To Linux Server

How to transfer the file from Windows to Linux server, while using below code I getting issue.

Command:- $ scp C:\Users\patil20\Desktop\NAV.1184.test112345.dat username@hostname:/u/spatil20/test.da

ERROR in Linux:- ssh: C: Name or service not known

thanks,
santosh

File Manager Folder Properties

In Windows, when a folder is right clicked, I can see the number of files and folders in that folder and the detailed size of the total of files and folders down to the byte. In Linux Mint when I do the same thing in the default file manager, it gives me a total nunber of "Items" and a size rounded to xx.x GB. Is there a file manager that will give me the same information as Windows does, or another way to get that information?

Modifying An XML File But Saving A Copy First. Unexpected Results

I've worked with Linux in the past, but mostly Windows. Perhaps someone can explain what I am seeing. This isn't a Linux OS, but Tomcat running under Windows. I'm thinking Linux rules apply here, but if this is the wrong forum, I apologize in advance.

I've got an app that runs under Tomcat. I needed to modify an XML config file to change a variable. The path was \app\tomcat\webapps\asset-manager-web\WEB-INF\am\conf\settings. The file was configParams.xml.

To protect myself from messing things up, I first made a copy of configParams.xml and named it configParams-ORIG.xml. I left this in the same folder as the file I was going to edit. I made the required edits and restarted the application service. The app never recognized the changes. Finally, I moved the configParams-ORIG.xml file to another folder, restarted, and everything worked.

Can someone explain why this is? I do this in Windows all the time. Why does having that original file, renamed, in the same folder cause a problem?

Tips On Using Bash Script To Edit A Windows Text File

I have a bash script executing on an AIX server to a windows share directory to update a windows text file. Most of the file is edited as expected but I have 3 issues that I am not sure how to resolve.

1. Windows text file contains a double backslash (\\) and the \\ is being written back as a single \ which corrupts the file.
2. I am not getting the last line of text in the file written back out.
3. Some lines of text are not written back out completely.

Here is a snippet of my bash script:
cp $Directory/Somefile $Directory/Somefile.$(date +'%Y%m%d')
cat /dev/null > ${HOME}/temp.out

while read -r inpLine; do
patternFound=n
echo ${inpLine} | grep -q 'SOMEPATTERN='
if [ $? = 0 ]; then
patternFound=y
echo "##${inpLine}" >> ${HOME}/temp.out
echo "SOMEPATTERN=newValue" >> ${HOME}/temp.out
fi

if [ ${patternFound} = "n" ]; then
echo ${inpLine} >> ${HOME}/temp.out
fi

done < $Directory/Somefile
mv ${HOME}/temp.out $Directory/Somefile

How To Open Linux File/software In Windows 8?

Hi,

Could anyone please explain as understandable as possible how could I on my Windows 8 open either single file or install (and use) entire software which is supposted to work on Linux and/or Ubuntu? I have absolutelly NO experience with Linux and have never used it. Honestly, I don't know if there is any difference between Linux and Ubuntu. I want to be inside my Windows 8 while using Linux files/sofware. The only solution I could think of are actually two but neither of them is useful for me:

1. Vmware (i don't know how to use it)
2. Rent remote computer (vps/rdp) with linux OS installed (this would let me be in Windows 8 while being able to use Linux file/software [on remote computer] but sooner or later I would want to have Windows installed there too)

Tried program Linux Reader but didn't work on my Windows 8. Although I would need solution for installation/usage of software (that can be used only on linux/ubuntu), regardless of details***, the current problem is basically related to single files only: I have two files, both in IMG extension. Don't know how to open them because Deamon Tools doesn't handle IMG. The problem is that filesystem in one of them is "Linux" and filesystem in another is "142". The error I am getting when I try to open them is:

"File with harddrive/disc snapshot is corrupted."

But this is most likely because they are supposted to be used in linux environment, hence such question.

*** when i said "details" I was referring to basically anything: type of software, size, purpose, whether or not it needs network connection, whether or not it contains logging in (username password, etc) requirement, etc.

The following solution for current situation (quoted error above) works only partially:

http://www.sysprobs.com/simple-tip-h...thout-software

I am able to open/run/mount IMG if I do what is described on this link (im basically opening iso in this case - see the website) but when opening the virtual drive, the following error message proves that the file can be used in linux/ubuntu only:

"Windows cannot access that drive. Drive could be corrupted. Make sure the drive is in condition that can be recognized by Windows. If drive isn't formatted then format it before usage."

Would need detailed instructions, for total beginner, who has never used linux/ubuntu, what to do in such case: how to use in win8 files/software that are supposted to be used in linux/ubuntu. Also answer on how to open IMG would be highly appreciated.

Kindest regards and thank you a million in advance.

Trouble Configuring Vsftp

Using a Raspberry Pi w/ Debian

Read the manual and several "how-to"s and am getting nowhere

vsftp is running and making a log file. I can get to the Pi with putty or SAMBA

Ultimately want to be able to both(I) ftp in under the "pi" user to access files remotely and (II) have people sending me huge files ftp them in anonymously

Have tried (I) the ftp client in Windows 7 Internet explorer 11, (ii) the ftp client in the Windows 7 "map network drive" UI, and (iii) ES file explorer on my Android phone.

The android phone tells me there is no server there. Windows 7 gets no password challenge, gives no error indication, but does nothing useful. The vsftpd log file shows some attempt by the Windows machine, nothing for the Android.

Config file and log file attached.

The Android is trying to use port 21, the config file mentions something about port 20. Which ports do I need to forward in my router to enable remote access?

Any help appreciated.

Thanks. Jonathan

Python Ftplib

hello all,

please help me with python ftplib. i was trying to copy files from my linux machine to a windows server using ftplib. everything was working good. but i'm only able to copy files from the same directory the script is. how do i copy files from a different directory? i always get "file not found error message". here's my code :

Code:
tester_name = str (socket.gethostname())
def upload(ftp, file):
    ext = os.path.splitext(file)[1]
    if ext in (".txt", ".htm", ".html"):
        ftp.storlines("STOR " + file, open(file))
    else:
        ftp.storbinary("STOR " + file, open(file, "rb"), 1024)



parse_source_path = ('/path/to/where/i/go/')
parse_source_file_list = os.listdir(parse_source_path)

ftp = ftplib.FTP("server_IP")
ftp.login("username", "pass")

folder_list = []

ftp.dir(folder_list.append)

if str(tester_name) not in str(folder_list) :
    ftp.mkd("%s"%tester_name)
    ftp.cwd("%s"%tester_name)
    for files in parse_source_file_list :
        print files
        upload(ftp, files)


else :
    print "later"

Usb Boot Disk Created For Linux Mint 17.1?

Good evening;
Following instructions on-line I attempted to create a bootable USB drive (32GB Sandsik extreme) with Linux 17.1 installed to enable a trial before attempting a permanent install beside windows 7 on a new computer with Win7 prof. installed.

On the usb I see a 4.0 GB area highlighted in G Parted but not accessible from the Linux file manager. This shows up as a ~1.4 GB sub-directory titled casper. and also as 4.0 GB 'file' named casper-rw. Can anyone explain what is the purpose of this sub-directory? The software I used to create the usb bootable drive and install Linux to is 'Universal-USB-Installer-1.9.5.9'. This is a windows executable. My intent was to create a bootable usb drive for Linux that also contained my required hardware drivers, etc. This doesn't appear to be working 100%; although Linux 17.1 boots the nvidia hardware drivers do not appear to be available even though I downloaded these and they are on the same usb. On boot-up a message box indicates that hardware acceleration is not enabled and higher than normal processor usage may occur.

Any assistance / direction, etc. would be greatly appreciated.

Regards;
Mike