How to change a python file Index - indexing

In VSC on the left, in the browser, a file is marked "index modified" (M)
How do I change it to "index added" (A) like all of my other files in that folder?
In other files staging changes and saving the file did the trick, but one file has no changes and is saved.
This is the problem file.

Related

How do i move a file located at the same place as my batch script to somewhere else?

I want my batch file to move a second file located at the same place.
I did the easiest method, which is move uninstall.bat "destination" but returns "System cannot find targeted file"
So I did this: move "%~dp0\uninstall.bat" "C:\Users\{username}\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup", but it still can't find the file.

Reopen DOC file in write mode, with macro inside it

I am using a macro template for particular DOC files only. It runs only for these files and, as I assume, it is treated as the DOC file itself.
All I want is to remove the file OR clear the contents of it, after the macro finishes. The initial file is read-only.
I have tried:
SavingAs in TEMP folder, change file attribute of initial file and then try to Kill it - no luck, it seems that initial file is still preloaded(?) and does not know that the read-only flag was removed. Error: Permision denied.
When I try to Close the initial document, I am closing also the macro itself...
So:
Is there any way to (from the macro inside the DOC file) :
Reopen the file in write-mode? (so I could clear the contents afterwards)
Remove the initial file? (after SaveAs so I actually will have a new file in write-mode and will be able to remove initial file)

Print button didn't save the PDF file at a shared path, and no error logged

I have an Excel macro that uses SAP for printing data in pdf format.
Steps:
it access the SAP transaction which provides a table with the necessary information
it press Print button (from the Menu Bar of SAP)
then Print window appears (from here it is selected Microsoft Print To PDF option and then it is pressed OK button)
Save As window appears (complete the path and filename: \S\BC....\outputName)
then Save button it is pressed
then no error happens
But if I access the path folder "\S\BC....", nothing happen, there is no file saved. BUT, if we look in "Date modified" property of the folder, it is modified in accordance with the last saving time.
Also, I mention that if I'm trying to write the pdf file on local folders, not network shared folders (example: a desktop folder: C:\Users\mariah\Test), macro works.
Also, I mention that user can Read&Write at the shared path \S\BC....\
Please help me to find the cause of this issue.
A VBA macro only does what you are allowed to do manually. Can you manually save the file in the shared path without the macro?
Is the common path really \S\BC...\ or \ \S\BC...\ ?
Regards,
ScriptMan
Solution proposed by the OP in this comment:
IT WORKS if I save the file on "C:\Users\UserName" and then cut it to shared path "S\BC...". So I've implemented code that saves the file in a path and then copy it to another path and then I deleted it from the first path (such that user never knows that I copy the file in other destination than desired destination).

How to index file names only in certain directory in IntelliJ?

I usually exclude cache and log directories from indexing in my projects but sometimes I want to quickly navigate to a log file.
Is there a way to keep log contents excluded from indexing but make it show up in "Navigate to file" popup?

Aspell Dictionary can't be opened

When I try to add a word or to ignore all, Aspell throws the error 'the file "C:/Program Files (x86)/Aspell/en.pws" cannot be opened for writing'. Anyone know what is causing this problem and how to fix it?
Ensure that the security settings of the "C:/Program Files (x86)/Aspell" folder for the current user allow for modifying and writing.
I had the same issue, and this cleared it right up.
Here is some help to the missing en.pws and en.prepl files. I have no idea why the developers failed to provide this simple solution for windows.
Go to the directory of "Aspell", which should have been installed as a sub-directory of NotePad++.
Right click in the main Aspell directory, choose "New" then choose "text document".
Rename the new text document as "en.pws" (without quotes) removing the "txt" extension, press enter key.
Repeat, make another new text document and rename it to "en.prepl".
Open up en.pws in NotePad++
copy and paste the following into en.pws, exactly as below;
personal_ws-1.1 en 2
µÄ
(Note: the µÄ symbols are below, on a new line below personal_ws-1.1 en 2)
Go to the Menu in NotePad++, click "Encoding" and make sure that "Encoding ANSI" is chosen (Dot beside it).
Save file and close file.
Open the en.prepl file in NotePad++
Copy and paste the following into that file;
personal_repl-1.1 en 0
Same, make sure the "Encode ANSI" is chosen.
Save and close file.
Note: you must close each file before using NotePad++ Spell Checker and "learn" button. Else it corrupts the file and you have to redo it.
NotePad++ will now work and you can save words to the ".pws" file.
Possible locations of GNU Aspell custom words file:
%localappdata%\VirtualStore\Program Files\Aspell
%programfiles%\Aspell
For English for example the custom words file is named en.pws (file name = language code) and the very first line must look like:
personal_ws-1.1 en 286
Where "en" is the file name (=language) and 286 are the number of words (lines) in that file. Last line must is always empty. GNU Aspell does not allow words ending with a number (e.g. Beta1). If you have such a word in your pws file Aspell or the application that uses it (e.g. Notepad++) may crash/hang ...
You may have to delete your en.pws file and create a new one (e.g. using Notepad++). File format as described above, otherwise GNU Aspell will fail to work.
I took the read only off of "C:/Program Files/Aspell" folder.
N++ still says
GNU Aspell
Error:
The file "C:/Program Files/Aspell/en.pws can not be opened for writing.
The english .50 dictionary install does not do a proper install into your C:/Program Files/Aspell directories. I had to open the Installer .EXE in WinRAR and copy the folders.
Should I copy the English dictionalry installer into my C:/Program Files/Aspell folder and install from there?
"Ensure that the security settings of the "C:/Program Files (x86)/Aspell" folder for the current user allow for modifying and writing"
"I took the read only off of "C:/Program Files/Aspell" folder. [The error message remains]"
It's not a read-only problem, but permissions. In Security give "Users" "Full control" over the .prepl and .pws files.
The Answer by "sth" and "Mark" is good, but it still has permissions issues in Windows 10. Instead of creating the two files in the Program Files folder for Aspell, create and initialize them on your desktop first; that will give your account full control on the files. (Also, set the encoding before you paste the initializing text.) Then move the two files into the Program Files folder for Aspell, and they will retain the full write permissions of your account without messing with the overall permissions of the Program Files folder for Aspell.