Auto upload files ftp - ftp

I have been looking all over on the web for a script to take files on my computer and ftp to a folder on my server. I would like for the script to check the folder periodically threw the day for new files to upload. Could someone please let me know if this possible and if so point me in the right direction. I really do not have any programming experience other than minimal java script. Thank you

Yes it is possible. I presume you're running Windows?
If you are, I would use Excel and VBA to drive winscp - http://winscp.net
A simple VBA script using the DIR command in Excel and keeping a time in a cell in a spreadsheet should do the trick. Write your script to check for files newer than the time in the cell, and add any which it finds to a winscp script.
Alternatively you could use something like Dropbox to sync files, which is much easier but slightly less flexible.

Related

How to Embed/Wrap the VB Script into Exe and Extract during the run time

I would like to convert the VB Script ( .VBS file) into EXE. If any one has any idea on how to convert VBS to Exe, Please share with me.
Some VBS IDEs allow this by default (vbsedit is one example) and there are also lots of tools that would do the conversion I even found a web page for that purpose. The list is quite long, if you google vbs to exe you will find many more.
Please keep in mind that this is not a compilation. Most will either pack the scripting host and the exe together or even just be the vbs file in a self extracting archive (you could also do this yourself with 7zip e.g.) This means the code will probably still be easily obtainable so it is not save to use this with cleartext passwords.
I also found this tool which claims to encrypt/obfuscate the script, but I cannot say how secure it really would be.
As a side note: If you encrypt the script any error message will be with the completely wrong line number, which confused some people I know who used these methods. So for debugging always use the original script.

Using Innosetup to install to multiple dirs

I'm writing an InnoSetup script to deploy software to a user's machine (default c:/programfiles) but I also want the user to be able to navigate to, say, a portable flash drive as well (like on a second page) and then have the installer load files to the HDD (programfiles) and then have it load files onto their selected flash drive - is this possible? How would I go about executing it?
thanks :)
I am not quite sure what you are trying to do but it sounds possible to me.
As you stated you could do this with a second page where you allow the user to select a drive or a directory where some files are.
You can then iterate over all files and install them into the selected program directory you chose in the setup before.
For more information it would be good if you could provide more information but so far this is the best answer i can give you for the provided information.
Maybe this helps you along when listing up all files in a directory:
Inno Setup: list all file names in an directory
And with this you can copy them:
Inno setup filecopy
And if you want a FolderBrowser use this:
Pascal Scripting: BrowseForFolder

How to zip a file in windows shell without vb script and with Window default zip only

Is their a way to zip a file without VB Script.I got a lot of examples on web to zip file or folder using vbs but i want to do it in a single BAT file.
Yes and no. There is no built in way to do this inside windows. You can use a external application like vbscript, a exe file like 7zip, rar, lots of resources can do this. Since windows is application poor when it comes to command lines is not really surprising. But no you do not need the VB Script for anything.
Just not so easy out of the box. Maybe makecab could do it for you? As a general rule you have a hard constraint in your question. A single BAT file which in general can not do almost anything without the support of hundreds of preinstalled or commonly installed other applications.
Could you specify a the constraints a bit better. Tel WHY you need this particular constraint? And what does it mean as even most of the bat command you use require more than one file.

MS Excel automation without macros in the generated reports. Any thoughts?

I know that the web is full of questions like this one, but I still haven't been able to apply the answers I can find to my situation.
I realize there is VBA, but I always disliked having the program/macro living inside the Excel file, with the resulting bloat, security warnings, etc. I'm thinking along the lines of a VBScript that works on a set of Excel files while leaving them macro-free. Now, I've been able to "paint the first column blue" for all files in a directory following this approach, but I need to do more complex operations (charts, pivot tables, etc.), which would be much harder (impossible?) with VBScript than with VBA.
For this specific example knowing how to remove all macros from all files after processing would be enough, but all suggestions are welcome. Any good references? Any advice on how to best approach external batch processing of Excel files will be appreciated.
Thanks!
PS: I eagerly tried Mark Hammond's great PyWin32 package, but the lack of documentation and interpreter feedback discouraged me.
You could put your macros in a separate excel file.
Almost anything you can do in VBA to automate excel you can do in VBScript (or any other script/language that supports COM).
Once you have created an instance of Excel.Application you can pretty much drop your VBA into a VBS and go from there.
If it's the Excel/VBA capability that you're looking to use then you could always start by creating all of the code that will interact with the Excel files you're wanting to work on within an Excel file - a kind of master file that is separated from the regular files, as suggested by Karsten W.
This gives you the freedom to write Excel/VBA.
Then you can call your master workbook (which can be configured to run your code when the book is opened, for example) from a VB script, batch file, Task Scheduler, etc.
If you want to get fancy, you can even use VBA in your master file to create/modify/delete custom macros/VBA modules in any of the target files that you're processing.
The info for just about all of the techniques I'm describing I got from the Excel VBA built-in reference docs, but it certainly helps to be familiar with the specific programming tasks that you're tackling. I'd advise that the best approach is to put together your tasks (eg, make column blue, update/sort data etc) one by one and then worry about the automation at the end.

Program to help sort files

I'm going through a lot of computers and a lot of data here and there.
I'm moving it all to a server so everybody has access to it.
There i have a folder for each computer. But a lot of the data is the same.
Is there any program to help me combine the data that is the same ?
It hell trying to do this manually.
Basically i want to tell this program, hey check this folder here C:/test and if there are any files that are duplicated, delete one of them.
If you need a tool for manual comparison of large directory structures, try Beyond Compare.
If you want automatic comparison scripts, Cygwin diff is good, possibly embedded in a shell script.

Resources