SPSS indicates that the .sav file is empty. Is there any way to recover the file from the Temp folder? - spss

I was just finishing my work. Had been working on this for 1 month, more than 100 questionnaires' data to enter on the database, there were only 3 left. My computer crashed, I turned it off and after I turned it on again, I opened SPSS and coudln't open the .sav file because of an error saying the file is empty (although its size is 68kb) and to try to open another file. I tried to recover the data through the journal file, through syntaxe, but I can't. Is there any way to recover the file from the Temp folder? I noticed that in the Temp folder there are some folders named like this: "pasw-cfe-1324076806484081348-tmp" which contain executable jar files inside. There are also some LCK files with the same names as those folders. After searching about PASW, I got the idea that it may be related to SPSS. Is there any way to open these folders/files? Also, I can send the file to anyone, in case this is needed.
Any help you can offer me will be truly appreciated. Thanks

Unfortunately, no there is no way to convert those temporary scratch file back into an SPSS Statistics system file (.sav). If you do not have backups of the file, perhaps in another format (.sav, *.xlsx, *.csv, etc.) or stored as a table in a database, your only recourse will be to start over.

I have an idea, you can do "system Restore"

Related

Avoid reading the same file multiple times using Telegraf and file input plugin

I need to read csv files inside a folder. New csv files are generated every time a user submits a form. I'm using the "file" input plugin to read the data and send it to Influxdb. These steps are working fine.
The problem is that the same file is read multiple times every data collection interval. I was thinking of a solution where I could move the file that was read to a different folder, but I couldn't do that with Telegraf's "exec" output plug.
ps: I can't change the way csv files are generated.
Any ideas on how to avoid reading the same csv file multiple times?
As you discovered file input plugin is used to read entire files at each collection interval.
My suggestion is for you to instead use the directory monitor input plugin. This will read files in a directory, monitor the directory for new files, and parse the ones that have not already been picked up yet. There are some configuration settings in that plugin that make it easier to time when new files are read as well.
Another option is to use the tail input plugin which will tail a file and only read new updates to that file as things come. However, I think the directory monitor is more likely something you are after for your scenario.
Thanks!

Using .zip files with Forge Design Automation for AutoCAD

I have a zip file containing several file types (.dwg,.xlsx,.pdf). If I specify a .zip file as input, I've noticed they're all accepted by Forge, but only .dwg's come back out. Is there anyway I can fix this?
Save your results to specific folder and finally create zip file.
ZipFile.CreateFromDirectory(CurrentDirectory + "\\Result", CurrentDirectory + "\\Result.zip");
This zip file set as result of your WorkItem.
Thanks to everyone who replied,
Ultimately, I create a project folder structure all my files are unzipped into (dwgs, pdfs, xlsx),beneath the working folder. My localname for both my input and result are identical in both the Activity and the Workitem. I recall Augusto telling me not to do this, but I have yet to run into an issue with it. In the end, my files get cycled in AutoCAD Core and saved to same location. DA zips the changed files and sends them to my endpoint. I took this approach, because if I save to changed files into a results folder, my modified dwg files and non-dwg files are now in two separate, adjacent locations. If there's a side affect of working with files in a single location, I'd like to know what it is.

I need to open some files in a folder that contains "RPA" in their name. so how can I do that in automation anywhere?

I am creating a program that opens files in a folder that contains "RPA" in their name. so, how can I do that?
You will use Loop on File in Folder command, and if condition inside the loop to check if the file name includes RPA.
Loop on Files on Folder
If condition $Filename$ includes RPA
Do Something here eg. open program/file command
End If
End Loop
#Shivam,
To get more clarity on your problem statement, you mentioned once that the files are already in PDF.
Are you trying to copy content from PDF to Word? In that case, you could use PDF Integration commands, provided the PDFs are not hand-written or scans. If that is the case, the text extraction might become more unreliable.
A safe bet with Automation Anywhere is to just extract all the text, open a new Word document and paste the content and save file.
Saving all files as word might a little counter-intuitive. You can just use the If statement within your for loop to only process files with "RPA" in their name.
Hope this help. Let us know you go :-)
its pretty simple use includes in your if statement
workbench snapshot

How can I open or review a large txt file

I have a few large txt files I'm trying to load into a data warehouse, I do get an error message with the offending row/line number but cannot open the txt file to review it as says it's 2 large 2,413,060KB. Someone suggested using the cmd option to do this but unsure how.
You can either use HJSplit in order to split the data or using another vim-based program such as gVim. Also it may be good to free up your PC's RAM as much as possible.

Need help opening printer spool shadow file (.SHD) that is locked

I'm interested in some information inside a shadow file (.shd) located inside the windows print spooling directory "C:\Windows\System32\spool\PRINTERS". Every time a print job is started, a spool file (.spl) and a shadow file (.shd) are created in that directory. So far I have been successful in detecting when a print job has started, and have been able to pause that print job. If you don't pause the job, the files eventually make their way to the printer and then are deleted by windows.
My problem is. I cannot open the .SHD files because they are locked in such a way that you can not read them while they are open by the sprint spooler. I've even tried going to the file in windows explorer and simply copying the file to another file, and that didn't work either. The .SPL spool files I can open though. I simply wait, and fairly quickly the spooler release that file. For the shadow file though, it permanently holds on to this file. Unfortunately, its the one I need.
The line of code I'm using specifically to open the file is as follows:
m_spoolJobStream = new FileStream(spoolFilePath, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
The IOException I get is:
The process cannot access the file 'C:\Windows\system32\spool\PRINTERS\FP00083.SHD' because it is being used by another process.
So yes, it is being used by another process. Its being used by the window's print spooler service. But I don't think there is anything I can do about that. All I want to do is read the file. I don't want to make any changes to it. Is there anything I can do here or am I just screwed?
Check the option: "Keep printed documents" (if you have HP printer) and then see your spool file folder, both shadow and spool files would be there.
Well, I did not find a way around this problem. I suspect there is no solution for this and it is by design. However I did find another way to get the information I wanted (at least it seems so thus far).
I'm using the FindNextPrinterChangeNotification() routine out of the winspool.drv library. This guy returns a pointer to a PRINTER_NOTIFY_INFO structure, which in turn contains an array of PRINTER_NOTIFY_INFO_DATA structures. Within that array, there is an element with its "Field" member marked as "JOB_NOTIFY_FIELD_DEVMODE". This element contains a fairly large structure of type DEVMODE. The structure is explained by M$ here http://msdn.microsoft.com/en-us/library/dd183565%28v=vs.85%29.aspx . This structure looks like it contains what I'm looking for and apparently is wrapped up in the .SHD file anyways according to this page http://www.undocprint.org/formats/winspool/shd. I'd like to know what else is in that .SHD file, but I still can't open it because its locked while the job is paused, and I suspect that it stays locked until the job is complete. Oh well, I think my new solution is more elegant anyways.
Just make sure you pause the job in the spool on BOTH your box and the server, then you should be able to copy/open/move the shd file just like you can the spl file. Worked for me, anyway...
This works for me:
- Hang your printer (e.g. jam the paper)
- Print and observe .SHD and .SPL being created
- Stop Print Spooler
- Open the file
The problem might be the FileShare.ReadWrite parameter. You're asking to read and write on the file and maybe that's why you get an error. You should try asking for read-only permission.

Resources