ftp *.[cC][sS][vV] not working as intended on Windows - linux

One of my client's ftp server recently moved from Linux to Windows.
Searching using *.[cC][sS][vV] looks for *.csv and *.CSV files as intended on Linux.
But this doesn't work on Windows. Is there a way to expand this correctly on Windows or perform a case-insensitive search on Windows ftp server?

The FTP specification does not allow any filemasks.
While some FTP servers do support this, you cannot rely on this functionality, if your script has to be platform-independent.
The Windows IIS FTP server does not support file masks. Even if it did, it would not support the set syntax ([]), as that's not supported in Windows file masks in general.
See also Get File Listing ending with A or B using Jscape FTP.
You have to retrieve all files (without any mask) and filter them locally in your code/script.

Related

Standard log locations for a cross platform application

I'm developing a cross-platform desktop application for Mac, Linux and Windows. The application will create a plain-text log file to help with debugging, amongst other things. What are people's recommendations for a sensible place to store the log on each of the platforms?
Here is my guess so far, based on web searches:
Mac: ~/Library/Logs/MY-APP-NAME/system.log
Linux: ~/.MY-APP-NAME/logs/system.log
Windows: %APPDATA%\MY-APP-NAME\logs\system.log
For Linux, the XDG Base Directory Specification is followed by some applications. Log files are not specifically called out as such. You can put them either into a subdirectory of the data directory ($XDG_DATA_HOME or $HOME/.local/share), where they will not be deleted automatically, or you could use a subdirectory of the cache directory ($XDG_CACHE or $HOME/.cache). In the latter case, the files could be automatically expired after some time.

Connect to remote dbf file with lazarus on linux

I need migrate a windows application made with delphi xe3 to a linux platform using Lazarus.
This application connect to dbf files hosted on a windows server 2008.
I'm trying to connect tdbf component to the server but i can't.
The documentation does not tell anything about remote connections.
Can you recommend me some other options to do that?
Dbf1.filePath := '192.160.90.100:/F/shared-folder'; This looks like an NFS path which I don't believe TDBF supports. You will need to mount the relevant folder containing your DBF files on your local file system for TDBF to be able to access it properly.
However, I would strongly recommend you migrate your application away from DBF files and to a proper SQL-based client/server DBMS like Firebird, mySQL or PostgreSQL. There really is no valid reason for using 25+ year old desktop databases nowadays.

Alternative for file access in windows share files

We have an application (built on .NET), which will need to read some mass storage files.
So we deploy the application in the Web server, and put the data in the data server. Then the application in the web server will access the files through windows share files.(Both the Web server and data Server use the Windows Server OS.
Now, we tried to change from windows to linux, then how about the file access?
The Samba suite provides windows file server functionality for unix systems.
Also you might like to look at NFS.
Even OCFS2 might be an alternative.

How to deploy a data file on tomcat web server in linux debian OS

I have a web application developed using JSP and Servlet. This web application is deployed on server having Debian Linux as OS and The Tomcat version is 5.5.31. As this applications required some data files, These data files will be get created automatically when setting are done using a standalone java application. This application is deployed on another machine. This setup is done. As I dont know much about Debian Linux and where my application is goes on it so I have some doubts in deployment of these autimatically generated data files which are as follows
As I made the .war file of my web application and deployed it using Tomcat Manager. so I dont know where exactly my application goes. I dont know the exact path. How do I find it?
Is it possible to create FTP for this web application which is deployed on Debian Linux server? I think that if creating FTP is possible then I will directly connect to FTP using my Stand alone Java program and will easily do the creation of the file and other file and directory manipulation.
If you've deployed a war, the application isn't anywhere on the filesystem as such. Most servers will unpack the war somewhere, but you shouldn’t rely on where that is.
I can think of several options:
getServletContext().getAttribute("javax.servlet.context.tempdir") to get the application's temp directory, then inform you external program of this location and place the file somewhere in there in a know location.
Arrange for a "know location" outside of the application, such as /tmp/somewhere or /var/cache/your-app/somewhere to place such files. (Note: /tmp is usually cleaned on startup of a linux machine)
As for getting the file onto the server from a remote machine: You could get your client to upload the file directly to your webapp (something like Apache HTTPClient will help you there), which means that you could do without the "know location" above. If you want to do this outside of the application though, I'd avoid FTP (due to security). Instead, I'd go with scp (secure copy).
Edit: Reading between the lines a little, you mention "setting" in the data file. If this is a configuration file which is not changed once the app is running, you may find it more convenient to have a "deploy" step on your server which simply takes the settings file and adds it to the war before deploying it. This is easy enough with "ant war" for example. You could then access the file using getClass().getResourceStream(..) or such.

Can I use Dreamweaver CS5 on Windows to manage local Linux files?

I'm running Dreamweaver CS5 on Windows 7. Currently, I set up sites in Dreamweaver so that the local site folder is a folder on a Windows server down the hall.
A new project will run on a Linux server (also just down the hall) and I'm being told by the Sys Admin to save my files (php, js, css, etc) on the Windows server and FTP them to the Linux server.
I realize Dreamweaver won't run on Linux. Can anyone tell me how to use Dreamweaver on Windows to read/write files from/to a local Linux server? If it's just a matter of typing in the path in Dreamweaver Site Setup, then what is the syntax (e.g., the analog to "\server\directory\subdirectory")?
Many thanks!
James
You would need to talk the sys admin into setting up samba access for you. Witha samba set up you could mount your samba share as a drive and use that as the site folder. Although I am not sure you would want all the extra files Dreamweaver brings to the table on your webserver.
I see two possible solutions:
Use dreamwaver's "Sites" feature to FTP the files over, if FTP was set-up on the Linux server.
Get the admins to set-up Samba on Linux, you would be able to use it just like a windows share as in \server\share ...

Resources