Posts

Showing posts with the label cmd

Best way to set environment variable and execute command in one line

Image
Clash Royale CLAN TAG #URR8PPP Best way to set environment variable and execute command in one line I want to make a backup with PostGreSQL pg_dump command with command line like : "<c:Program FilesPostgreSQL9.6binpg_dump>" -h localhost -p 5432 -d test_backup_bat -U user -f D:destination_backuptest.backup but I need to set PGPASSWORD before as environment variable to execute the backup command PGPASSWORD=mypassword How can I make this in only one command line into Windows CLI ? By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Error:Invalid data, chunk must be a string or buffer, not object when running ionic -v

Image
Clash Royale CLAN TAG #URR8PPP Error:Invalid data, chunk must be a string or buffer, not object when running ionic -v Error in cmd I've tried uninstalling ionic, cordova and node.js and reinstalling them two times. One with lts node and the othe, current lts.But the error still persists. Any help would be greatly appreciated By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

How to open a cmd with a command a certain amount of times

Image
Clash Royale CLAN TAG #URR8PPP How to open a cmd with a command a certain amount of times I have a cmd opening with a certain command and want it to duplicate the amount of times that they type. 1 Answer 1 Type inside the batch script myscript.bat : myscript.bat @echo off for /L %%i in (1,1,10) do ( echo.%%i ) This will print 1..10 numbers. For details type inside console window: for /? for /? If you want open separate console on each iteration: @echo off for /L %%i in (1,1,10) do ( start "" "%COMSPEC%" /C "echo.%%i&pause" ) By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Deleting subfolder and files in window through cmd and timestamp backup

Image
Clash Royale CLAN TAG #URR8PPP Deleting subfolder and files in window through cmd and timestamp backup I want to delete files and folders from a folder by using cmd in windows.How can i do? And i need to copy a file and paste appending timestamp by time. Help will be appreciated Thanks! 1 Answer 1 To delete all files and subfolders in directory, You can use powershell: powershell -Command "Remove-Item 'pathtodirectory' -Recurse -Force" powershell -Command "Remove-Item 'pathtodirectory' -Recurse -Force" pathtodirectory By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.