Windows 10: Can't make backup file (add ! to override) - windows

This is not a duplicate of:
Vim error E510: Can't make backup file (add ! to override), there are no spaces before or after my equal signs
Cannot create backup file(add ! to overwrite)
My .vimrc in Windows is located at C:\Proram Files (x86)\Vim\_vimrc.
I've added:
set undodir="C:/Program Files (x86)/Vim/undo//"
set backupdir="C:/Program Files (x86)/Vim/backup//"
set directory="C:/Program Files (x86)/Vim/swp//"
I have:
Created the directories in question
Ensured that my user has write permissions for the directory and every file in said directory
Tried different formats for the directory, including using / instead of \, omitting // at the end of the directory, and escaping the spaces in Program Files (x86)
Despite all of this I still receive an E510 error upon saving. Can anyone help out? Doing things on Windows is so amazingly frustrating. :l

Related

Why does this batch file fail for some users?

I have a batch file that copies the most recent version of an access front-end file to the user's C: drive and then opens it from there.
For some users, the copy command causes the batch file to close, and I can't work out what could cause that. The file seems to copy, but the batch file just closes itself without any visible error messages.
I've used Pause to confirm that the failure happens at the Copy step, not the Run or the If.
This is Windows 7, I've tried it with Copy and Xcopy. The users with the issue say it's worked in the past, they all have access to the location being copied from (and to). Mapping the location doesn't seem to make any difference, and UNC paths work for most users so it's not that.
Deleting the existing files in C:\databases doesn't help.
if not exist "C:\Databases\" mkdir "C:\Databases"
copy "\\SERVER02\FINOPS\COMMAQR\DIGIHUB\1. Live Version\DIGIHUB v2.5.accdb" "C:\Databases\"
start [the file]
For 95%+ of users, the batch file copies the most recent version down and opens the file. For a handful, the batch file reaches the copy step and closes itself.
Does anyone know why this could happen, or alternatives to both Copy and XCopy that might not fail?

I can delete files in shell when in the directory, but I get a File not found error from outside the directory

I know this is a rudimentary question, but I am dumbfounded.
Let us say that I have two files in the following directory structure:
C:\Program Files\Program\Directory\Subdirectory\one.txt and C:\Program Files\Program\Directory\Subdirectory\Subsubdirectory\two.txt
When I run the following command in shell, I get File not found errors...
del C:\Program Files\Program\Directory\Subdirectory\one.txt C:\Program Files\Program\Directory\Subdirectory\Subsubdirectory\two.txt
I have also tried wrapping the file path and names in quotes with no success.
I have also tried a simple test on two files sitting on a user desktop without success: C:\Users\User\Desktop\one.txt and ...\two.txt etc.
For reference, I want to push a script which will remove the maintenance and update functionality from Firefox to prevent users from getting update messages etc, automatic updates and to break the functionality should someone find out how to try [I am also running mKiosk extension], and I want to push the script using SOTI MobiControl software.
You have spaces in your command path. You need to quote your arguments:
del "C:\Program Files\Program\Directory\Subdirectory\one.txt"
I have not found a solution to this syntax issue - however the problem is solved by the functionality of the SOTI Mobicontroler software.
In the package/script delivery, I am writing individual del commands for each file. SOTI appears to handle each script line one at a time and sequentially.

Writing and integrating a batch file to create directory listing

I'm trying to modify the Windows 7 "Print Directory Listing" option to allow me to create a simple text list of the files located in the folder, saved to that folder. A couple of hours of Googling only found "Print Directory Listing" directions.
I've tried a few attempts at modifying the PRINTDIR.BAT file, but I'm pretty sure my output directory selection is wrong.
Here's my current effort, pared down to the bare metal.
#echo off
dir %1 > ".\_Listing.txt"
exit
The batch file is saved into the C:\Windows\ folder, and I suspect it's attempting to create the file in and of that folder, instead of the desired target folder.

CLIPS saving files to Virtualstore despite adding path

I am trying to save rules and facts to a specific directory in my CLIPS programs.
(save "c:\tmp\rules.clp")
(save-facts "c:\tmp\facts1")
1- But it seems CLIPS disregards the path information. Since my windows username is not the owner of the CLIPS installation directory, the files are saved in a virtual store directory:
C:\Users\USERNAME\AppData\Local\VirtualStore\Program Files (x86)\CLIPS\Bin
2- If I run a system command and include the path, the same thing happens. The path is disregarded and the notepad cannot find the intended file.
(system "notepad c:\tmp\output.txt")
Is there a way to force these commands to save/read from a specific directory?
CLIPS doesn't have the ability to override directory/files permissions set by the operating system. The path to the save/save-facts command is not modified before being passed to the system libraries for opening files (either fopen or fopen_s). I'd suggest changing the directory permissions if the user account you're using doesn't have write privileges.
I think I have found the problem.
The paths should both be included in double quotes and the slashes should be converted into forward slashes.

Copying files from cab to folder

I'm trying to copy the files from .cab file to a normal folder. I don't have extract.exe on my Windows 7. And using xcopy /s .\file.cab .\extracts throws an error saying "Cannot perform a cyclic copy". I've googled the error, but found nothing applicable. The destination folder is empty, and otherwise it can only copy the .cab file but not the files within it. I want to copy all the files within .cab file into a folder. Can someone help? I want this to work on a client environment so I don't want to download any other tools, just command line if I can.
Try any of the following commands. Both should be included in your windows 7
expand file.cab .\extracts
extrac32 file.cab /L .\extracts

Resources