I am trying to PUT a file into Snowflake staging area using PUT
command.
When I run the command using snowsql I am able to PUT the file in
stage area.
When I try to execute the same command from a shell script it is
throwing below error.
253006 (n/a): File doesn't exist: ['/home/raghu/sample_pipeline_config.csv']
Any help will be highly appreciated. FYI I am running the commands in
Ubuntu terminal.
Related
I am currently attempting to use FileZilla Pro CLI on a Windows machine to connect and upload to a site in that is working in the Site Manager.
The issue is, the command below works perfectly when pasting it directly into the cmd line. However when saving it as a batch file, it simply just gets to the fzcli> prompt and then nothing happens.
The two line breaks are on purposes to override the requirement for a password and it works perfectly when pasted in.
Does anyone know if this is a cmd line issue, or if my commands need to be different to work in batch file mode?
fzcli
connect --site 0testsite01
put C:/inetpub/wwwroot/websites/sftp/files/customer/test-01.txt /test-sftp/testuser01/test/test-01-uploaded.txt
PAUSE
Your batch file executes fzcli in an interactive mode. The fzcli then waits for you to interactively enter the commands. Only after you would exit the fzcli, the batch file would continue. And fail, as it will try to execute connect as a batch file command. The fzcli does not know about the batch file. Nor does the batch file interpreter know about the fzcli commands.
It's a common misconception. You will find plenty of similar questions basically about scripting any tool that has its own commands. For example: sftp, ftp, psftp, winscp.
To provide commands to fzcli, it seems that you need to use --script switch. The fzcli documentation gives this example:
fzcli --mode standalone --script C:\Scripts\script-file
I want to automate a file Upload to my webserver using curl. I created a batch file and used Windows Task Scheduler to execute it. When I run the batch file manually with my mouse, it sends the files to my webserver. When Windows Task Scheduler executes the batch file, it does not send files and I get error message :
'curl' is not recognized as an internal command or external, an executable program or a batch file.
curl -T C:/wamp/www/weblab/vinums/100321092.php ftp://ftp.myhost.com/anatemp/ --user user#myhost.com:mypassword
I have resolve that problem, by adding to the Windows > Control Panel > System > Advanced Settings > Environment variable
The path of curl for example : (C:\curl-7.75.0-win64-mingw\bin;)
And it works ... thanks for all
i have the line below in the package.json file.
"start:setup": "./start-setup.sh",
and from windows command prompt i run the command npm run start:setup
and i get this error..
'.' is not recognised as an internal or external command....
what i have tried?
i tried the above command on gitbash and didnt work.
i changed this
"start:setup": "./start-setup.sh",
to
"start:setup": "sh start-setup.sh",
and error sh is not an external or internal command is thrown
Could someone help me fix this. thanks.
.sh is a Linux shell file.
Windows doesn't process such files by default.
If you want, you could try installing bash for windows.
We have an desktop application that dynamically generates a command file to pull specific files that have the current date in the name. So in the end we have a command file that looks like this:
lcd e:\localpath
mget Filename0111.dat
mget Filenametwo0111.dat
mget Filenamethree0111.dat
bye
Where 0111 is MMDD. The command file is created via a .bat file that the desktop app executes. The application then connects to the remote server via PSFTP.exe and runs that command file to pull files.
The problem we're running into is we updated the PSFTP.exe to a newer version due to a separate issue that occurred. Now if a file is not available on the remote server it returns an error code 2 which stops the rest of the files from being retrieved. So if the first file in the list doesn't exist then it fails and the rest of the files are not downloaded.
Is there a way to ignore the error code 2 so that the rest of the files get retrieved? I had thought at first to run PSFTP.exe and it's commands through a batch file but that didn't work.
Any ideas?
PSFTP.exe has a command -be that will continue executing the batch if there is an issue.
When running a batch file, this option causes PSFTP to continue processing even if a command fails to complete successfully.
You might want this to happen if you wanted to delete a file and didn't care if it was already not present, for example.
I am trying to run a batch file from Jenkins but I can't get it to run.
In the pre-build step I have entered the file I want to execute but I get the stacktrace shown below. Jenkins doesn't recognize the cmd command.
How can I fix this?
Your Linux Jenkins slave doesn't support cmd. In order to workaround it you have several options (from better to worse):
Add a Windows slave to Jenkins and run cmd from there.
Port your batch file to bash or similar and run it from your Linux Jenkins slave.
Add some kind of DOS emulator (Wine, DOSBox, DOSemu) in your Linux Jenkins slave.
My advice: If you know Linux & Bash or you have no control of Jenkins go for option 2. Otherwise go for option 1. Avoid option 3.
You're trying to run CMD on a LINUX machine. either change the slave you're running to Windows machine or migrate the Batch script to shell script.
Good luck!